diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index c05232ca..5446ae31 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -1,5 +1,17 @@ --- HMI/n2t-out +++ HMI/US/landscape/n2t-out +├── file list +│ @@ -12,9 +12,8 @@ +│ pageTest.txt +│ popupFan.txt +│ popupInSel.txt +│ popupLight.txt +│ popupNotify.txt +│ popupShutter.txt +│ popupThermo.txt +│ -screensaver.txt +│ -screensaver2.txt +│ +screensaver.txt │ --- HMI/n2t-out/Program.s.txt ├── +++ HMI/US/landscape/n2t-out/Program.s.txt │ @@ -10,10 +10,7 @@ @@ -13,306 +25,27 @@ │ - // fix touch offset │ - lcd_dev fffb 0002 0000 0020 │ - page pageStartup -│ --- HMI/n2t-out/cardThermo.txt -├── +++ HMI/US/landscape/n2t-out/cardThermo.txt -│ @@ -358,15 +358,36 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest2.val>xTempMin1.val) -│ { -│ xTempDest2.val=xTempDest2.val-xTempStep1.val -│ } -│ - tmSendHighLow.en=1 -│ + // event,buttonPress2,entn,tempUpd,X -│ + //craft command -│ + tSend.txt="event,buttonPress2," -│ + tSend.txt+=entn.txt+"," -│ + tSend.txt+="tempUpdHighLow," -│ + //convert temperature -│ + covx xTempDest1.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + tSend.txt+="|" -│ + covx xTempDest2.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + //send calc crc -│ + btlen tSend.txt,sys0 -│ + crcrest 1,0xffff // reset CRC -│ + crcputh 55 bb -│ + crcputs sys0,2 -│ + crcputs tSend.txt,0 -│ + //send cmd -│ + printh 55 bb -│ + prints sys0,2 -│ + prints tSend.txt,0 -│ + prints crcval,2 -│ -│ Dual-state Button bUp2 -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -376,15 +397,36 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest2.valxTempMin1.val) -│ { -│ xTempDest.val=xTempDest.val-xTempStep1.val -│ } -│ - tmSendTemp.en=1 -│ + // event,buttonPress2,entn,tempUpd,X -│ + //craft command -│ + tSend.txt="event,buttonPress2," -│ + tSend.txt+=entn.txt+"," -│ + tSend.txt+="tempUpd," -│ + //convert temperature -│ + covx xTempDest.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + //send calc crc -│ + btlen tSend.txt,sys0 -│ + crcrest 1,0xffff // reset CRC -│ + crcputh 55 bb -│ + crcputs sys0,2 -│ + crcputs tSend.txt,0 -│ + //send cmd -│ + printh 55 bb -│ + prints sys0,2 -│ + prints tSend.txt,0 -│ + prints crcval,2 -│ -│ Dual-state Button btDown1 -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -644,15 +704,36 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest1.val>xTempMin1.val) -│ { -│ xTempDest1.val=xTempDest1.val-xTempStep1.val -│ } -│ - tmSendHighLow.en=1 -│ + // event,buttonPress2,entn,tempUpd,X -│ + //craft command -│ + tSend.txt="event,buttonPress2," -│ + tSend.txt+=entn.txt+"," -│ + tSend.txt+="tempUpdHighLow," -│ + //convert temperature -│ + covx xTempDest1.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + tSend.txt+="|" -│ + covx xTempDest2.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + //send calc crc -│ + btlen tSend.txt,sys0 -│ + crcrest 1,0xffff // reset CRC -│ + crcputh 55 bb -│ + crcputs sys0,2 -│ + crcputs tSend.txt,0 -│ + //send cmd -│ + printh 55 bb -│ + prints sys0,2 -│ + prints tSend.txt,0 -│ + prints crcval,2 -│ -│ Dual-state Button btUp -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -662,15 +743,33 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest.valxTempMin1.val) -│ { -│ xTempDest2.val=xTempDest2.val-xTempStep1.val -│ } -│ - tmSendHighLow.en=1 -│ + // event,buttonPress2,entn,tempUpd,X -│ + //craft command -│ + tSend.txt="event,buttonPress2," -│ + tSend.txt+=entn.txt+"," -│ + tSend.txt+="tempUpdHighLow," -│ + //convert temperature -│ + covx xTempDest1.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + tSend.txt+="|" -│ + covx xTempDest2.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + //send calc crc -│ + btlen tSend.txt,sys0 -│ + crcrest 1,0xffff // reset CRC -│ + crcputh 55 bb -│ + crcputs sys0,2 -│ + crcputs tSend.txt,0 -│ + //send cmd -│ + printh 55 bb -│ + prints sys0,2 -│ + prints tSend.txt,0 -│ + prints crcval,2 -│ -│ Dual-state Button bUp2 -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -376,15 +397,36 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest2.valxTempMin1.val) -│ { -│ xTempDest.val=xTempDest.val-xTempStep1.val -│ } -│ - tmSendTemp.en=1 -│ + // event,buttonPress2,entn,tempUpd,X -│ + //craft command -│ + tSend.txt="event,buttonPress2," -│ + tSend.txt+=entn.txt+"," -│ + tSend.txt+="tempUpd," -│ + //convert temperature -│ + covx xTempDest.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + //send calc crc -│ + btlen tSend.txt,sys0 -│ + crcrest 1,0xffff // reset CRC -│ + crcputh 55 bb -│ + crcputs sys0,2 -│ + crcputs tSend.txt,0 -│ + //send cmd -│ + printh 55 bb -│ + prints sys0,2 -│ + prints tSend.txt,0 -│ + prints crcval,2 -│ -│ Dual-state Button btDown1 -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -644,15 +704,36 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest1.val>xTempMin1.val) -│ { -│ xTempDest1.val=xTempDest1.val-xTempStep1.val -│ } -│ - tmSendHighLow.en=1 -│ + // event,buttonPress2,entn,tempUpd,X -│ + //craft command -│ + tSend.txt="event,buttonPress2," -│ + tSend.txt+=entn.txt+"," -│ + tSend.txt+="tempUpdHighLow," -│ + //convert temperature -│ + covx xTempDest1.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + tSend.txt+="|" -│ + covx xTempDest2.val,tTmp.txt,0,0 -│ + tSend.txt+=tTmp.txt -│ + //send calc crc -│ + btlen tSend.txt,sys0 -│ + crcrest 1,0xffff // reset CRC -│ + crcputh 55 bb -│ + crcputs sys0,2 -│ + crcputs tSend.txt,0 -│ + //send cmd -│ + printh 55 bb -│ + prints sys0,2 -│ + prints tSend.txt,0 -│ + prints crcval,2 -│ -│ Dual-state Button btUp -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -662,15 +743,33 @@ -│ -│ Events -│ Touch Press Event -│ if(xTempDest.valxTempMin1.val) -+ { -+ xTempDest2.val=xTempDest2.val-xTempStep1.val -+ } -+ tmSendHighLow.en=1 -+ // event,buttonPress2,entn,tempUpd,X -+ //craft command -+ tSend.txt="event,buttonPress2," -+ tSend.txt+=entn.txt+"," -+ tSend.txt+="tempUpdHighLow," -+ //convert temperature -+ covx xTempDest1.val,tTmp.txt,0,0 -+ tSend.txt+=tTmp.txt -+ tSend.txt+="|" -+ covx xTempDest2.val,tTmp.txt,0,0 -+ tSend.txt+=tTmp.txt -+ //send calc crc -+ btlen tSend.txt,sys0 -+ crcrest 1,0xffff // reset CRC -+ crcputh 55 bb -+ crcputs sys0,2 -+ crcputs tSend.txt,0 -+ //send cmd -+ printh 55 bb -+ prints sys0,2 -+ prints tSend.txt,0 -+ prints crcval,2 -+ -+ate Button bUp2 -+ributes -+ Scope : local -+ Dragging : 0 -+ Disable release event after dragging: 0 -+ Send Component ID : disabled -+15 +397,36 @@ -+ -+nts -+ Touch Press Event -+ if(xTempDest2.valxTempMin1.val) -+ { -+ xTempDest.val=xTempDest.val-xTempStep1.val -+ } -+ tmSendTemp.en=1 -+ // event,buttonPress2,entn,tempUpd,X -+ //craft command -+ tSend.txt="event,buttonPress2," -+ tSend.txt+=entn.txt+"," -+ tSend.txt+="tempUpd," -+ //convert temperature -+ covx xTempDest.val,tTmp.txt,0,0 -+ tSend.txt+=tTmp.txt -+ //send calc crc -+ btlen tSend.txt,sys0 -+ crcrest 1,0xffff // reset CRC -+ crcputh 55 bb -+ crcputs sys0,2 -+ crcputs tSend.txt,0 -+ //send cmd -+ printh 55 bb -+ prints sys0,2 -+ prints tSend.txt,0 -+ prints crcval,2 -+ -+ate Button btDown1 -+ributes -+ Scope : local -+ Dragging : 0 -+ Disable release event after dragging: 0 -+ Send Component ID : disabled -+15 +704,36 @@ -+ -+nts -+ Touch Press Event -+ if(xTempDest1.val>xTempMin1.val) -+ { -+ xTempDest1.val=xTempDest1.val-xTempStep1.val -+ } -+ tmSendHighLow.en=1 -+ // event,buttonPress2,entn,tempUpd,X -+ //craft command -+ tSend.txt="event,buttonPress2," -+ tSend.txt+=entn.txt+"," -+ tSend.txt+="tempUpdHighLow," -+ //convert temperature -+ covx xTempDest1.val,tTmp.txt,0,0 -+ tSend.txt+=tTmp.txt -+ tSend.txt+="|" -+ covx xTempDest2.val,tTmp.txt,0,0 -+ tSend.txt+=tTmp.txt -+ //send calc crc -+ btlen tSend.txt,sys0 -+ crcrest 1,0xffff // reset CRC -+ crcputh 55 bb -+ crcputs sys0,2 -+ crcputs tSend.txt,0 -+ //send cmd -+ printh 55 bb -+ prints sys0,2 -+ prints tSend.txt,0 -+ prints crcval,2 -+ -+ate Button btUp -+ributes -+ Scope : local -+ Dragging : 0 -+ Disable release event after dragging: 0 -+ Send Component ID : disabled -+15 +743,33 @@ -+ -+nts -+ Touch Press Event -+ if(xTempDest.val1) + { + bufferPos=0 + while(bufferPos-125&&xcR.val<125) + { + //tStatusNew.txt="x low, -> y" + // check if below minimum value (change is negative) + if(ycR.val<-80) + { + //tDirNew.txt="down" + tSend.txt="event,buttonPress2,screensaver,swipeDown" + }else if(ycR.val>80) + { + //tDirNew.txt="up" + tSend.txt="event,buttonPress2,screensaver,swipeUp" + }else + { + //tDirNew.txt="invalid" + } + // y difference between -125 and 125 (swipe on x-axis) + }else if(ycR.val>-125&&ycR.val<125) + { + //tStatusNew.txt="y low, -> x" + if(xcR.val<-80) + { + //tDirNew.txt="right" + tSend.txt="event,buttonPress2,screensaver,swipeRight" + }else if(xcR.val>80) + { + //tDirNew.txt="left" + tSend.txt="event,buttonPress2,screensaver,swipeLeft" + }else + { + //tDirNew.txt="invalid" + } + //diagonal swipe invalid + }else + { + //tStatusNew.txt="invalid" + //tDirNew.txt="diagonal" + } + } + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + diff --git a/HMI/n2t-out/cardGrid.txt b/HMI/n2t-out/cardGrid.txt index 2244d8ee..f7cfd549 100644 --- a/HMI/n2t-out/cardGrid.txt +++ b/HMI/n2t-out/cardGrid.txt @@ -858,6 +858,10 @@ Timer tmSerial { page screensaver } + if(tId.txt=="screensaver2") + { + page screensaver2 + } if(tId.txt=="cardEntities") { page cardEntities diff --git a/HMI/n2t-out/pageStartup.txt b/HMI/n2t-out/pageStartup.txt index 0bb24a1b..a2cd84df 100644 --- a/HMI/n2t-out/pageStartup.txt +++ b/HMI/n2t-out/pageStartup.txt @@ -152,7 +152,7 @@ Text tVersion Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none - Text : 45 + Text : 46 Max. Text Size : 10 Picture p0 @@ -318,6 +318,10 @@ Timer tmSerial { page screensaver } + if(tId.txt=="screensaver2") + { + page screensaver2 + } if(tId.txt=="cardEntities") { page cardEntities diff --git a/HMI/n2t-out/screensaver.txt b/HMI/n2t-out/screensaver.txt index 330151d4..5cff612e 100644 --- a/HMI/n2t-out/screensaver.txt +++ b/HMI/n2t-out/screensaver.txt @@ -117,16 +117,6 @@ Text m0 Text : Max. Text Size : 10 - Events - Touch Press Event - if(tDate.x==0) - { - vis m0,1 - }else - { - vis m0,1 - } - Text t10 Attributes Scope : local diff --git a/HMI/n2t-out/screensaver2.txt b/HMI/n2t-out/screensaver2.txt new file mode 100644 index 00000000..71606bf3 --- /dev/null +++ b/HMI/n2t-out/screensaver2.txt @@ -0,0 +1,881 @@ +Page screensaver2 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID : disabled + + Events + Preinitialize Event + recmod=1 + baud=115200 + vis tInstruction,0 + vis tTmp,0 + vis p0,0 + vis tNotifyHead,0 + vis tNotifyText,0 + //load gloabl time string from pageIcons + //tTime.txt=vaTime.txt + spstr pageIcons.vaTime.txt,tTime.txt,"?",0 + spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1 + if(tAMPM.txt=="") + { + vis tAMPM,0 + } + tDate.txt=pageIcons.vaDate.txt + dim=dimValue + vis tSend,0 + //page open event + // clear weather elements, to keep example content in HMI + + Postinitialize Event + click m0,1 + +Variable (string) strCommand + Attributes + Scope : local + Text : + Max. Text Size: 200 + +Variable (string) strTmp + Attributes + Scope : local + Text : + Max. Text Size: 2 + +Variable (string) tId + Attributes + Scope : local + Text : + Max. Text Size: 25 + +Variable (string) tInstruction + Attributes + Scope : local + Text : + Max. Text Size: 50 + +Variable (string) tSend + Attributes + Scope : local + Text : + Max. Text Size: 50 + +Variable (string) tTmp + Attributes + Scope : local + Text : + Max. Text Size: 50 + +Variable (int32) vaTap + Attributes + Scope: local + Value: 0 + +Variable (int32) xc1 + Attributes + Scope: local + Value: 0 + +Variable (int32) xc2 + Attributes + Scope: local + Value: 0 + +Variable (int32) xcR + Attributes + Scope: local + Value: 0 + +Variable (int32) yc1 + Attributes + Scope: local + Value: 0 + +Variable (int32) yc2 + Attributes + Scope: local + Value: 0 + +Variable (int32) ycR + Attributes + Scope: local + Value: 0 + +Text m0 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + + Events + Touch Press Event + if(tDate.x==0) + { + vis m0,1 + }else + { + vis m0,1 + } + +Text t10 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : | + Max. Text Size : 10 + +Text tAMPM + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : PM + Max. Text Size : 10 + +Text tDate + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : Sat, 17. Dec + Max. Text Size : 40 + +Text tF1Icon + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tF2Icon + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tF3Icon + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tF4Icon + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 5 + +Text tForecast1 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast1Val + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast2 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast2Val + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast3 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast3Val + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast4 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tForecast4Val + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tIcon1 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tIcon2 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tMainIcon + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tMainText + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tNotifyHead + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 35 + +Text tNotifyText + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 80 + +Text tTime + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : 21\r\n23 + Max. Text Size : 15 + +Text tTimeAdd + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 40 + +Picture p0 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + +Timer tm0 + Attributes + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + if(tc0.val!=0) + { + xc2.val=tch0 + yc2.val=tch1 + } + +Timer tmSerial + Attributes + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + // data available + if(usize>1) + { + bufferPos=0 + while(bufferPos-125&&xcR.val<125) + { + //tStatusNew.txt="x low, -> y" + // check if below minimum value (change is negative) + if(ycR.val<-80) + { + //tDirNew.txt="down" + tSend.txt="event,buttonPress2,screensaver,swipeDown" + }else if(ycR.val>80) + { + //tDirNew.txt="up" + tSend.txt="event,buttonPress2,screensaver,swipeUp" + }else + { + //tDirNew.txt="invalid" + } + // y difference between -125 and 125 (swipe on x-axis) + }else if(ycR.val>-125&&ycR.val<125) + { + //tStatusNew.txt="y low, -> x" + if(xcR.val<-80) + { + //tDirNew.txt="right" + tSend.txt="event,buttonPress2,screensaver,swipeRight" + }else if(xcR.val>80) + { + //tDirNew.txt="left" + tSend.txt="event,buttonPress2,screensaver,swipeLeft" + }else + { + //tDirNew.txt="invalid" + } + //diagonal swipe invalid + }else + { + //tStatusNew.txt="invalid" + //tDirNew.txt="diagonal" + } + } + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 +