diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt new file mode 100644 index 00000000..cab0cf69 --- /dev/null +++ b/HMI/US/landscape/diff-eu-version.txt @@ -0,0 +1,12 @@ +diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt +--- HMI/n2t-out/Program.s.txt 2022-03-29 22:51:44.242306277 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-03-29 22:51:45.066317995 +0000 +@@ -10,6 +10,6 @@ + int sleepValue=0 + // dim value + int dimValue=40 +- // fix touch offset +- lcd_dev fffb 0002 0000 0020 ++ // fix touch offset (Removed for US version) ++ //lcd_dev fffb 0002 0000 0020 + page pageStartup diff --git a/HMI/US/landscape/n2t-out/Program.s.txt b/HMI/US/landscape/n2t-out/Program.s.txt new file mode 100644 index 00000000..43723f71 --- /dev/null +++ b/HMI/US/landscape/n2t-out/Program.s.txt @@ -0,0 +1,15 @@ +Program.s + //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data + int sys0=0,sys1=0,sys2=0 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement + int bufferPos=0 + int recvCrc=0 + int payloadLength=0 + int par0=0,par1=0 + // sleep timeout in s + int sleepTimeout=20 + int sleepValue=0 + // dim value + int dimValue=40 + // fix touch offset (Removed for US version) + //lcd_dev fffb 0002 0000 0020 + page pageStartup diff --git a/HMI/US/landscape/n2t-out/cardAlarm.txt b/HMI/US/landscape/n2t-out/cardAlarm.txt new file mode 100644 index 00000000..098d5c6e --- /dev/null +++ b/HMI/US/landscape/n2t-out/cardAlarm.txt @@ -0,0 +1,705 @@ +Page cardAlarm + 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 + vis p0,0 + vis tSend,0 + vis tInstruction,0 + vis tTmp,0 + vis tId,0 + //vis nPageDisp,0 + vis arm1,0 + vis arm2,0 + vis arm3,0 + vis arm4,0 + vis b0,0 + vis b1,0 + vis b2,0 + vis b3,0 + vis b4,0 + vis b5,0 + vis b6,0 + vis b7,0 + vis b8,0 + vis b9,0 + vis b10,0 + vis tCode,0 + +Variable (string) strCommand + Attributes + Scope : local + Text : + Max. Text Size: 200 + +Variable (string) entn + Attributes + Scope : local + Text : + Max. Text Size: 50 + +Variable (string) tSend + Attributes + Scope : local + Text : + Max. Text Size: 100 + +Variable (string) va1 + Attributes + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) va2 + Attributes + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) va3 + Attributes + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) va4 + Attributes + Scope : local + Text : + Max. Text Size: 20 + +Text tTmp + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tInstruction + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 20 + +Text tId + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 20 + +Text tCode + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tIcon + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Picture p0 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + +Button bNext + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + tSend.txt="event,buttonPress2,cardAlarm,bNext" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button bPrev + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + tSend.txt="event,buttonPress2,cardAlarm,bPrev" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b0 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 1 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"1" + +Button b1 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 2 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"2" + +Button b2 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 3 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"3" + +Button b3 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 4 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"4" + +Button b4 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 5 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"5" + +Button b5 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 6 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"6" + +Button b6 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 7 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"7" + +Button b7 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 8 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"8" + +Button b8 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 9 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"9" + +Button b9 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : 0 + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt=tCode.txt+"0" + +Button b10 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : CLR + Max. Text Size : 10 + + Events + Touch Press Event + tCode.txt="" + +Button arm1 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 40 + + Events + Touch Press Event + // event,buttonPress2,entn,arm1,tCode + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+=va1.txt+"," + tSend.txt+=tCode.txt + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Button arm3 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 40 + + Events + Touch Press Event + // event,buttonPress2,entn,arm1,tCode + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+=va3.txt+"," + tSend.txt+=tCode.txt + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Button arm2 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 40 + + Events + Touch Press Event + // event,buttonPress2,entn,arm1,tCode + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+=va2.txt+"," + tSend.txt+=tCode.txt + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Button arm4 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 40 + + Events + Touch Press Event + // event,buttonPress2,entn,arm1,tCode + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+=va4.txt+"," + tSend.txt+=tCode.txt + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Timer tmSerial + Attributes + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + // data available + if(usize>1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin.val) + { + xTempDest.val=xTempDest.val-xTempStep.val + } + // 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,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button bUp + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest.val1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos isn't supported + if(tTmp.txt=="disable") + { + vis t0,0 + vis bColor,0 + vis pColorWheel,0 + }else + { + vis t0,1 + //only enable bColor button if color temp is also supported + if(mode_temp.val==1) + { + vis bColor,1 + } + if(mode.val==0) + { + vis pColorWheel,1 + } + } + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,screensaver.vaTime.txt,",",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,screensaver.vaDate.txt,"?",1 + } + if(tInstruction.txt=="dimmode") + { + // get value + spstr strCommand.txt,tTmp.txt,",",1 + covx tTmp.txt,dimValue,0,0 + } + if(tInstruction.txt=="timeout") + { + //set timeout to global var + spstr strCommand.txt,tTmp.txt,",",1 + covx tTmp.txt,sleepTimeout,0,0 + } + if(tInstruction.txt=="pageType") + { + //command format pageType,specialPageName + //write name of speical page to tId + spstr strCommand.txt,tId.txt,",",1 + //save second arg if there's one + spstr strCommand.txt,tTmp.txt,",",2 + //save third arg if there's one + spstr strCommand.txt,pageIcons.tTmp2.txt,",",3 + //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... + udelete payloadLength-1 + bufferPos=0 + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="pageStartup") + { + page pageStartup + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + } + // end of user code + udelete payloadLength-1 + bufferPos=0 + } + } + } + } + // next character + bufferPos++ + } + } + +Timer tmCooldown + Attributes + Scope : local + Period (ms): 100 + Enabled : no + + Events + Timer Event + tmCooldown.en=0 + +TouchCap tc0 + Attributes + Scope: local + Value: 0 + + Events + Touch Press Event + sleepValue=0 + diff --git a/HMI/US/landscape/n2t-out/popupNotify.txt b/HMI/US/landscape/n2t-out/popupNotify.txt new file mode 100644 index 00000000..3dce4218 --- /dev/null +++ b/HMI/US/landscape/n2t-out/popupNotify.txt @@ -0,0 +1,397 @@ +Page popupNotify + 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 + vis p0,0 + vis tSend,0 + vis tTmp,0 + vis tInstruction,0 + vis tId,0 + +Variable (string) strCommand + Attributes + Scope : local + Text : + Max. Text Size: 1000 + +Variable (string) entn + Attributes + Scope : local + Text : + Max. Text Size: 30 + +Variable (int32) vaOldSleepT + Attributes + Scope: local + Value: 0 + +Text tSend + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : newtxt + Max. Text Size : 100 + +Text tTmp + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 10 + +Text tInstruction + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 20 + +Text tId + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 20 + +Text tHeading + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 40 + +Text tText + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 500 + +Picture p0 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + +Button b0 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + sleepTimeout=vaOldSleepT.val + tSend.txt="event,buttonPress2,popupNotify,bExit" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b2 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 10 + + Events + Touch Press Event + sleepTimeout=vaOldSleepT.val + //craft command + tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b1 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : + Max. Text Size : 10 + + Events + Touch Press Event + sleepTimeout=vaOldSleepT.val + //craft command + tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,1 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Timer tmSleep + Attributes + Scope : local + Period (ms): 1000 + Enabled : yes + + Events + Timer Event + if(sleepTimeout!=0) + { + sleepValue+=1 + if(sleepTimeout<=sleepValue) + { + screensaver.originPage.val=dp + sleepValue=0 + click b0,1 + click b0,0 + } + } + +Timer tmSerial + Attributes + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + // data available + if(usize>1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos