diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt new file mode 100644 index 00000000..5373664e --- /dev/null +++ b/HMI/US/landscape/diff-eu-version.txt @@ -0,0 +1,175 @@ +diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt +--- HMI/n2t-out/Program.s.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-05-29 21:20:55.900415426 +0000 +@@ -11,6 +11,4 @@ + // dim value + int dimValue=40 + int dimValueNormal=100 +- // fix touch offset +- lcd_dev fffb 0002 0000 0020 + page pageStartup +diff -bur HMI/n2t-out/cardAlarm.txt HMI/US/landscape/n2t-out/cardAlarm.txt +--- HMI/n2t-out/cardAlarm.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/cardAlarm.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -683,10 +683,7 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal ++ dim=dimValue + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/cardEntities.txt HMI/US/landscape/n2t-out/cardEntities.txt +--- HMI/n2t-out/cardEntities.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/cardEntities.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -1924,10 +1924,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/cardGrid.txt HMI/US/landscape/n2t-out/cardGrid.txt +--- HMI/n2t-out/cardGrid.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/cardGrid.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -846,10 +846,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/cardMedia.txt HMI/US/landscape/n2t-out/cardMedia.txt +--- HMI/n2t-out/cardMedia.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/cardMedia.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -635,10 +635,7 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal ++ dim=dimValue + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/cardQR.txt HMI/US/landscape/n2t-out/cardQR.txt +--- HMI/n2t-out/cardQR.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/cardQR.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -581,10 +581,7 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal ++ dim=dimValue + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/cardThermo.txt HMI/US/landscape/n2t-out/cardThermo.txt +--- HMI/n2t-out/cardThermo.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/cardThermo.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -1169,10 +1169,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt +--- HMI/n2t-out/pageStartup.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-05-29 21:20:55.900415426 +0000 +@@ -177,7 +177,7 @@ + recmod=1 + bauds=115200 + // startup event +- tSend.txt="event,startup,"+tVersion.txt+",eu" ++ tSend.txt="event,startup,"+tVersion.txt+",us-l" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC +@@ -273,10 +273,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/popupLight.txt HMI/US/landscape/n2t-out/popupLight.txt +--- HMI/n2t-out/popupLight.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/popupLight.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -560,10 +560,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/popupNotify.txt HMI/US/landscape/n2t-out/popupNotify.txt +--- HMI/n2t-out/popupNotify.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/popupNotify.txt 2022-05-29 21:20:55.900415426 +0000 +@@ -310,10 +310,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="timeout") + { +diff -bur HMI/n2t-out/popupShutter.txt HMI/US/landscape/n2t-out/popupShutter.txt +--- HMI/n2t-out/popupShutter.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/popupShutter.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -405,10 +405,6 @@ + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 +- dim=dimValueNormal + } + if(tInstruction.txt=="time") + { +diff -bur HMI/n2t-out/screensaver.txt HMI/US/landscape/n2t-out/screensaver.txt +--- HMI/n2t-out/screensaver.txt 2022-05-29 21:20:55.128409486 +0000 ++++ HMI/US/landscape/n2t-out/screensaver.txt 2022-05-29 21:20:55.904415457 +0000 +@@ -397,9 +397,6 @@ + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 + dim=dimValue +- // get value normal +- spstr strCommand.txt,tTmp.txt,"~",2 +- covx tTmp.txt,dimValueNormal,0,0 + } + if(tInstruction.txt=="time") + { diff --git a/HMI/US/landscape/n2t-out-visual/Program.s.txt b/HMI/US/landscape/n2t-out-visual/Program.s.txt new file mode 100644 index 00000000..f321685e --- /dev/null +++ b/HMI/US/landscape/n2t-out-visual/Program.s.txt @@ -0,0 +1,14 @@ +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 + int dimValueNormal=100 + page pageStartup diff --git a/HMI/US/landscape/n2t-out-visual/cardAlarm.txt b/HMI/US/landscape/n2t-out-visual/cardAlarm.txt new file mode 100644 index 00000000..84e52341 --- /dev/null +++ b/HMI/US/landscape/n2t-out-visual/cardAlarm.txt @@ -0,0 +1,1381 @@ +Page cardAlarm + Attributes + ID : 0 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID : disabled + Fill : solid color + Back. Color : 6371 + + Events + Preinitialize Event + vis p0,0 + vis tSend,0 + vis tInstruction,0 + vis tTmp,0 + vis tId,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 + vis bPrev,0 + vis bNext,0 + +Variable (string) strCommand + Attributes + ID : 6 + Scope : local + Text : + Max. Text Size: 200 + +Variable (string) entn + Attributes + ID : 9 + Scope : local + Text : + Max. Text Size: 80 + +Variable (string) tSend + Attributes + ID : 25 + Scope : local + Text : + Max. Text Size: 100 + +Variable (string) va1 + Attributes + ID : 30 + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) va2 + Attributes + ID : 31 + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) va3 + Attributes + ID : 32 + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) va4 + Attributes + ID : 33 + Scope : local + Text : + Max. Text Size: 20 + +Text tTmp + Attributes + ID : 2 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 406 + y coordinate : 277 + Width : 34 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tInstruction + Attributes + ID : 7 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 290 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tId + Attributes + ID : 8 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 99 + y coordinate : 290 + Width : 39 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tCode + Attributes + ID : 23 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 107 + y coordinate : 16 + Width : 192 + Height : 49 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 10565 + Font Color : 40179 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : password + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tIcon + Attributes + ID : 26 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 315 + y coordinate : 16 + Width : 64 + Height : 49 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 3 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture p0 + Attributes + ID : 1 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 0 + Width : 480 + Height : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 0 + +Button bNext + Attributes + ID : 3 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 406 + y coordinate : 16 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 3 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button bPrev + Attributes + ID : 4 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 24 + y coordinate : 16 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 3 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tSend.txt="event,buttonPress2,cardAlarm," + if(bPrev.txt=="") + { + tSend.txt+="bUp" + }else + { + tSend.txt+="bPrev" + } + //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 + +Button b0 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 94 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 1 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"1" + +Button b1 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 132 + y coordinate : 94 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 2 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"2" + +Button b2 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 224 + y coordinate : 93 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 3 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"3" + +Button b3 + Attributes + ID : 15 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 152 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 4 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"4" + +Button b4 + Attributes + ID : 16 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 132 + y coordinate : 152 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 5 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"5" + +Button b5 + Attributes + ID : 17 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 224 + y coordinate : 152 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 6 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"6" + +Button b6 + Attributes + ID : 18 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 40 + y coordinate : 210 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 7 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"7" + +Button b7 + Attributes + ID : 19 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 132 + y coordinate : 210 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 8 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"8" + +Button b8 + Attributes + ID : 20 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 224 + y coordinate : 210 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 9 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"9" + +Button b9 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 131 + y coordinate : 266 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : 0 + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt=tCode.txt+"0" + +Button b10 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 224 + y coordinate : 266 + Width : 75 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : CLR + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + tCode.txt="" + +Button arm1 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 315 + y coordinate : 91 + Width : 141 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 0 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 40 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Button arm3 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 315 + y coordinate : 210 + Width : 140 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 0 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 40 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Button arm2 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 315 + y coordinate : 152 + Width : 141 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 0 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 40 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Button arm4 + Attributes + ID : 29 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 315 + y coordinate : 266 + Width : 141 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : border + Border Color : 6371 + Border Width : 2 + Font ID : 0 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 1374 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 40 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + tCode.txt="" + +Hotspot mSwipeNext + Attributes + ID : 35 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 471 + y coordinate : 5 + Width : 9 + Height : 310 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + ID : 36 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 0 + Width : 450 + Height : 9 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + ID : 37 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 5 + Width : 9 + Height : 310 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Timer tmSerial + Attributes + ID : 5 + 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(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin1.val) + { + xTempDest1.val=xTempDest1.val-xTempStep1.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdHigh," + //convert temperature + covx xTempDest1.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 + ID : 39 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 193 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color (Unpressed) : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 6371 + Font Color (Unpressed) : 50712 + Font Color (Pressed) : 64512 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + if(xTempDest2.valxTempMin2.val) + { + xTempDest2.val=xTempDest2.val-xTempStep2.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdLow," + //convert temperature + 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 + ID : 51 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 272 + y coordinate : 68 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color (Unpressed) : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 6371 + Font Color (Unpressed) : 50712 + Font Color (Pressed) : 50712 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + if(xTempDest.valxTempMin1.val) + { + xTempDest.val=xTempDest.val-xTempStep1.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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Hotspot mSwipeNext + Attributes + ID : 34 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 471 + y coordinate : 5 + Width : 9 + Height : 310 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + ID : 35 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 0 + Width : 453 + Height : 9 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + ID : 36 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 5 + Width : 9 + Height : 310 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Timer tmSerial + Attributes + ID : 3 + 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 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 + } + } + // set t0 Color (Localization) + spstr strCommand.txt,t0.txt,"~",7 + // set t4 Temperature (Localization) + spstr strCommand.txt,t4.txt,"~",8 + // set t1 Brightness (Localization) + spstr strCommand.txt,t1.txt,"~",9 + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,pageIcons.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=="pageStartup") + { + page pageStartup + } + if(tId.txt=="screensaver") + { + page screensaver + } + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="popupLight") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupLight + } + if(tId.txt=="popupShutter") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupShutter + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardThermo") + { + page cardThermo + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + if(tId.txt=="cardQR") + { + page cardQR + } + } + // end of user code + udelete payloadLength-1 + bufferPos=0 + } + } + } + } + // next character + bufferPos++ + } + } + +Timer tmCooldown + Attributes + ID : 26 + Scope : local + Period (ms): 100 + Enabled : no + + Events + Timer Event + tmCooldown.en=0 + +TouchCap tc0 + Attributes + ID : 14 + Scope: local + Value: 0 + + Events + Touch Press Event + sleepValue=0 + diff --git a/HMI/US/landscape/n2t-out-visual/popupNotify.txt b/HMI/US/landscape/n2t-out-visual/popupNotify.txt new file mode 100644 index 00000000..0f1aee02 --- /dev/null +++ b/HMI/US/landscape/n2t-out-visual/popupNotify.txt @@ -0,0 +1,628 @@ +Page popupNotify + Attributes + ID : 0 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID : disabled + Fill : solid color + Back. Color : 6371 + + Events + Preinitialize Event + vis p0,0 + vis tSend,0 + vis tTmp,0 + vis tInstruction,0 + vis tId,0 + +Variable (string) strCommand + Attributes + ID : 8 + Scope : local + Text : + Max. Text Size: 1000 + +Variable (string) entn + Attributes + ID : 15 + Scope : local + Text : + Max. Text Size: 30 + +Variable (int32) vaOldSleepT + Attributes + ID : 16 + Scope: local + Value: 0 + +Text tSend + Attributes + ID : 3 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 0 + Width : 348 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : newtxt + Max. Text Size : 100 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tTmp + Attributes + ID : 4 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 421 + y coordinate : 277 + Width : 34 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tInstruction + Attributes + ID : 9 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 15 + y coordinate : 290 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tId + Attributes + ID : 10 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 115 + y coordinate : 290 + Width : 100 + Height : 29 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tHeading + Attributes + ID : 11 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 26 + Width : 345 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 40 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tText + Attributes + ID : 12 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 38 + y coordinate : 74 + Width : 397 + Height : 171 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 500 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture p0 + Attributes + ID : 1 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 0 + Width : 480 + Height : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 0 + +Button b0 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 412 + y coordinate : 8 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b2 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 254 + y coordinate : 261 + Width : 182 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 8 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b1 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 39 + y coordinate : 261 + Width : 182 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 8 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Timer tmSleep + Attributes + ID : 6 + Scope : local + Period (ms): 1000 + Enabled : yes + + Events + Timer Event + if(sleepTimeout!=0) + { + sleepValue+=1 + if(sleepTimeout<=sleepValue) + { + sleepValue=0 + click b0,1 + click b0,0 + } + } + +Timer tmSerial + Attributes + ID : 7 + 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(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin1.val) + { + xTempDest1.val=xTempDest1.val-xTempStep1.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdHigh," + //convert temperature + covx xTempDest1.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 + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest2.valxTempMin2.val) + { + xTempDest2.val=xTempDest2.val-xTempStep2.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdLow," + //convert temperature + 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 + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest.valxTempMin1.val) + { + xTempDest.val=xTempDest.val-xTempStep1.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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Hotspot mSwipeNext + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bPrev,1 + +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 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 + } + } + // set t0 Color (Localization) + spstr strCommand.txt,t0.txt,"~",7 + // set t4 Temperature (Localization) + spstr strCommand.txt,t4.txt,"~",8 + // set t1 Brightness (Localization) + spstr strCommand.txt,t1.txt,"~",9 + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,pageIcons.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=="pageStartup") + { + page pageStartup + } + if(tId.txt=="screensaver") + { + page screensaver + } + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="popupLight") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupLight + } + if(tId.txt=="popupShutter") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupShutter + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardThermo") + { + page cardThermo + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + if(tId.txt=="cardQR") + { + page cardQR + } + } + // 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..0f032184 --- /dev/null +++ b/HMI/US/landscape/n2t-out/popupNotify.txt @@ -0,0 +1,418 @@ +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,2 + 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,2 + 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,2 + 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) + { + 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(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin1.val) + { + xTempDest1.val=xTempDest1.val-xTempStep1.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdHigh," + //convert temperature + covx xTempDest1.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 + ID : 36 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 57 + y coordinate : 176 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color (Unpressed) : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 6371 + Font Color (Unpressed) : 50712 + Font Color (Pressed) : 64512 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + if(xTempDest2.valxTempMin2.val) + { + xTempDest2.val=xTempDest2.val-xTempStep2.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdLow," + //convert temperature + 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 + ID : 48 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 136 + y coordinate : 177 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color (Unpressed) : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 6371 + Font Color (Unpressed) : 50712 + Font Color (Pressed) : 50712 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + if(xTempDest.valxTempMin1.val) + { + xTempDest.val=xTempDest.val-xTempStep1.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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Hotspot mSwipeNext + Attributes + ID : 53 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 311 + y coordinate : 5 + Width : 9 + Height : 470 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + ID : 54 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 10 + y coordinate : 0 + Width : 300 + Height : 9 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + ID : 55 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 5 + Width : 9 + Height : 470 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Timer tmSerial + Attributes + ID : 3 + 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 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 + } + } + // set t0 Color (Localization) + spstr strCommand.txt,t0.txt,"~",7 + // set t4 Temperature (Localization) + spstr strCommand.txt,t4.txt,"~",8 + // set t1 Brightness (Localization) + spstr strCommand.txt,t1.txt,"~",9 + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,pageIcons.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=="pageStartup") + { + page pageStartup + } + if(tId.txt=="screensaver") + { + page screensaver + } + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="popupLight") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupLight + } + if(tId.txt=="popupShutter") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupShutter + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardThermo") + { + page cardThermo + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + if(tId.txt=="cardQR") + { + page cardQR + } + } + // end of user code + udelete payloadLength-1 + bufferPos=0 + } + } + } + } + // next character + bufferPos++ + } + } + +Timer tmCooldown + Attributes + ID : 26 + Scope : local + Period (ms): 100 + Enabled : no + + Events + Timer Event + tmCooldown.en=0 + +TouchCap tc0 + Attributes + ID : 14 + Scope: local + Value: 0 + + Events + Touch Press Event + sleepValue=0 + diff --git a/HMI/US/portrait/n2t-out-visual/popupNotify.txt b/HMI/US/portrait/n2t-out-visual/popupNotify.txt new file mode 100644 index 00000000..e3d8bf9a --- /dev/null +++ b/HMI/US/portrait/n2t-out-visual/popupNotify.txt @@ -0,0 +1,628 @@ +Page popupNotify + Attributes + ID : 0 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + Width : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID : disabled + Fill : solid color + Back. Color : 6371 + + Events + Preinitialize Event + vis p0,0 + vis tSend,0 + vis tTmp,0 + vis tInstruction,0 + vis tId,0 + +Variable (string) strCommand + Attributes + ID : 8 + Scope : local + Text : + Max. Text Size: 1000 + +Variable (string) entn + Attributes + ID : 15 + Scope : local + Text : + Max. Text Size: 30 + +Variable (int32) vaOldSleepT + Attributes + ID : 16 + Scope: local + Value: 0 + +Text tSend + Attributes + ID : 3 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 0 + Width : 300 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : newtxt + Max. Text Size : 100 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tTmp + Attributes + ID : 4 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 281 + y coordinate : 409 + Width : 34 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tInstruction + Attributes + ID : 9 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 13 + y coordinate : 409 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tId + Attributes + ID : 10 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 113 + y coordinate : 410 + Width : 100 + Height : 29 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tHeading + Attributes + ID : 11 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 21 + Width : 260 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 40 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tText + Attributes + ID : 12 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 74 + Width : 307 + Height : 260 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 500 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture p0 + Attributes + ID : 1 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 0 + Width : 319 + Height : 479 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 0 + +Button b0 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 268 + y coordinate : 14 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b2 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 162 + y coordinate : 348 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 8 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b1 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 5 + y coordinate : 348 + Width : 150 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 8 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Timer tmSleep + Attributes + ID : 6 + Scope : local + Period (ms): 1000 + Enabled : yes + + Events + Timer Event + if(sleepTimeout!=0) + { + sleepValue+=1 + if(sleepTimeout<=sleepValue) + { + sleepValue=0 + click b0,1 + click b0,0 + } + } + +Timer tmSerial + Attributes + ID : 7 + 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(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin1.val) + { + xTempDest1.val=xTempDest1.val-xTempStep1.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdHigh," + //convert temperature + covx xTempDest1.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 + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest2.valxTempMin2.val) + { + xTempDest2.val=xTempDest2.val-xTempStep2.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdLow," + //convert temperature + 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 + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest.valxTempMin1.val) + { + xTempDest.val=xTempDest.val-xTempStep1.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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Hotspot mSwipeNext + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bPrev,1 + +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 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 + } + } + // set t0 Color (Localization) + spstr strCommand.txt,t0.txt,"~",7 + // set t4 Temperature (Localization) + spstr strCommand.txt,t4.txt,"~",8 + // set t1 Brightness (Localization) + spstr strCommand.txt,t1.txt,"~",9 + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,pageIcons.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=="pageStartup") + { + page pageStartup + } + if(tId.txt=="screensaver") + { + page screensaver + } + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="popupLight") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupLight + } + if(tId.txt=="popupShutter") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupShutter + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardThermo") + { + page cardThermo + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + if(tId.txt=="cardQR") + { + page cardQR + } + } + // 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/portrait/n2t-out/popupNotify.txt b/HMI/US/portrait/n2t-out/popupNotify.txt new file mode 100644 index 00000000..0f032184 --- /dev/null +++ b/HMI/US/portrait/n2t-out/popupNotify.txt @@ -0,0 +1,418 @@ +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,2 + 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,2 + 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,2 + 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) + { + 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(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin1.val) + { + xTempDest1.val=xTempDest1.val-xTempStep1.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdHigh," + //convert temperature + covx xTempDest1.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 + ID : 39 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 178 + y coordinate : 67 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color (Unpressed) : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 6371 + Font Color (Unpressed) : 50712 + Font Color (Pressed) : 64512 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + if(xTempDest2.valxTempMin2.val) + { + xTempDest2.val=xTempDest2.val-xTempStep2.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdLow," + //convert temperature + 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 + ID : 51 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 257 + y coordinate : 68 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color (Unpressed) : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 6371 + Font Color (Unpressed) : 50712 + Font Color (Pressed) : 50712 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + if(xTempDest.valxTempMin1.val) + { + xTempDest.val=xTempDest.val-xTempStep1.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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Hotspot mSwipeNext + Attributes + ID : 34 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 440 + y coordinate : 5 + Width : 40 + Height : 310 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + ID : 35 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 12 + y coordinate : 0 + Width : 426 + Height : 9 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + ID : 36 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 5 + Width : 9 + Height : 310 + Effect : load + Effect Priority : 0 + Effect Time : 300 + + Events + Touch Press Event + click bPrev,1 + +Timer tmSerial + Attributes + ID : 3 + 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 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 + } + } + // set t0 Color (Localization) + spstr strCommand.txt,t0.txt,"~",7 + // set t4 Temperature (Localization) + spstr strCommand.txt,t4.txt,"~",8 + // set t1 Brightness (Localization) + spstr strCommand.txt,t1.txt,"~",9 + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,pageIcons.vaDate.txt,"~",1 + } + if(tInstruction.txt=="dimmode") + { + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 + // get value normal + spstr strCommand.txt,tTmp.txt,"~",2 + covx tTmp.txt,dimValueNormal,0,0 + dim=dimValueNormal + } + 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=="pageStartup") + { + page pageStartup + } + if(tId.txt=="screensaver") + { + page screensaver + } + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="popupLight") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupLight + } + if(tId.txt=="popupShutter") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupShutter + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardThermo") + { + page cardThermo + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + if(tId.txt=="cardQR") + { + page cardQR + } + } + // end of user code + udelete payloadLength-1 + bufferPos=0 + } + } + } + } + // next character + bufferPos++ + } + } + +Timer tmCooldown + Attributes + ID : 26 + Scope : local + Period (ms): 100 + Enabled : no + + Events + Timer Event + tmCooldown.en=0 + +TouchCap tc0 + Attributes + ID : 14 + Scope: local + Value: 0 + + Events + Touch Press Event + sleepValue=0 + diff --git a/HMI/n2t-out-visual/popupNotify.txt b/HMI/n2t-out-visual/popupNotify.txt new file mode 100644 index 00000000..a86ef261 --- /dev/null +++ b/HMI/n2t-out-visual/popupNotify.txt @@ -0,0 +1,632 @@ +Page popupNotify + Attributes + ID : 0 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + Width : 480 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID : disabled + Fill : solid color + Back. Color : 6371 + + Events + Preinitialize Event + vis p0,0 + vis tSend,0 + vis tTmp,0 + vis tInstruction,0 + vis tId,0 + +Variable (string) strCommand + Attributes + ID : 8 + Scope : local + Text : + Max. Text Size: 1000 + +Variable (string) entn + Attributes + ID : 15 + Scope : local + Text : + Max. Text Size: 30 + +Variable (int32) vaOldSleepT + Attributes + ID : 16 + Scope: local + Value: 0 + +Text tSend + Attributes + ID : 3 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 0 + Width : 348 + Height : 22 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : newtxt + Max. Text Size : 100 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tTmp + Attributes + ID : 4 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 406 + y coordinate : 277 + Width : 34 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tInstruction + Attributes + ID : 9 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 290 + Width : 100 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tId + Attributes + ID : 10 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 100 + y coordinate : 290 + Width : 100 + Height : 29 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tHeading + Attributes + ID : 11 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 26 + Width : 345 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 2 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : left + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 40 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Text tText + Attributes + ID : 12 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 23 + y coordinate : 74 + Width : 397 + Height : 171 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 6371 + Font Color : 65535 + Horizontal Alignment : left + Vertical Alignment : top + Input Type : character + Text : + Max. Text Size : 500 + Word wrap : enabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + +Picture p0 + Attributes + ID : 1 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 0 + y coordinate : 0 + Width : 480 + Height : 320 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Picture ID : 0 + +Button b0 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 397 + y coordinate : 8 + Width : 50 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 1 + Back. Color : 6371 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 14823 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text :  + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b2 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 239 + y coordinate : 261 + Width : 182 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 8 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Button b1 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 24 + y coordinate : 261 + Width : 182 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Font ID : 2 + Back. Color : 6371 + Back. Picture ID (Pressed) : 8 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 65535 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + 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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Timer tmSleep + Attributes + ID : 6 + Scope : local + Period (ms): 1000 + Enabled : yes + + Events + Timer Event + if(sleepTimeout!=0) + { + sleepValue+=1 + if(sleepTimeout<=sleepValue) + { + sleepValue=0 + click b0,1 + click b0,0 + } + } + +Timer tmSerial + Attributes + ID : 7 + 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(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPos1) + { + bufferPos=0 + while(bufferPosxTempMin1.val) + { + xTempDest1.val=xTempDest1.val-xTempStep1.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdHigh," + //convert temperature + covx xTempDest1.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 + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest2.valxTempMin2.val) + { + xTempDest2.val=xTempDest2.val-xTempStep2.val + } + // event,buttonPress2,entn,tempUpd,X + //craft command + tSend.txt="event,buttonPress2," + tSend.txt+=entn.txt+"," + tSend.txt+="tempUpdLow," + //convert temperature + 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 + State : unpressed + Text :  + Max. Text Size : 10 + + Events + Touch Press Event + if(xTempDest.valxTempMin1.val) + { + xTempDest.val=xTempDest.val-xTempStep1.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,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + +Hotspot mSwipeNext + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bNext,1 + +Hotspot mSwipeUp + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bPrev,1 + +Hotspot mSwipePrev + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + + Events + Touch Press Event + click bPrev,1 + +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 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 + } + } + // set t0 Color (Localization) + spstr strCommand.txt,t0.txt,"~",7 + // set t4 Temperature (Localization) + spstr strCommand.txt,t4.txt,"~",8 + // set t1 Brightness (Localization) + spstr strCommand.txt,t1.txt,"~",9 + } + if(tInstruction.txt=="time") + { + // get set time to global variable + spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 + } + if(tInstruction.txt=="date") + { + // get set date to global variable + spstr strCommand.txt,pageIcons.vaDate.txt,"~",1 + } + if(tInstruction.txt=="dimmode") + { + // get value + spstr strCommand.txt,tTmp.txt,"~",1 + covx tTmp.txt,dimValue,0,0 + // get value normal + spstr strCommand.txt,tTmp.txt,"~",2 + covx tTmp.txt,dimValueNormal,0,0 + dim=dimValueNormal + } + 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=="pageStartup") + { + page pageStartup + } + if(tId.txt=="screensaver") + { + page screensaver + } + if(tId.txt=="cardEntities") + { + page cardEntities + } + if(tId.txt=="cardGrid") + { + page cardGrid + } + if(tId.txt=="popupLight") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupLight + } + if(tId.txt=="popupShutter") + { + pageIcons.tTmp1.txt=tTmp.txt + page popupShutter + } + if(tId.txt=="popupNotify") + { + page popupNotify + } + if(tId.txt=="cardThermo") + { + page cardThermo + } + if(tId.txt=="cardMedia") + { + page cardMedia + } + if(tId.txt=="cardAlarm") + { + page cardAlarm + } + if(tId.txt=="cardQR") + { + page cardQR + } + } + // 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/n2t-out/popupNotify.txt b/HMI/n2t-out/popupNotify.txt new file mode 100644 index 00000000..58cbb0d5 --- /dev/null +++ b/HMI/n2t-out/popupNotify.txt @@ -0,0 +1,422 @@ +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,2 + 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,2 + 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,2 + 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) + { + 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(bufferPosright", + 1: "right->left", + 2: "top->bottom", + 3: "bottom->top", + }, + }, + 0: {# Waveform + "name": "Flow Direction", + "mapping": { + 0: "left->right", + 1: "right->left", + 2: "right aligned", + }, + }, + }, + }, + "borderc": { + "struct": "i", + "name": "Border Color", + "vis": True, + "style": { + -1: { + "ignore": True, + }, + 1: { + "ignore": False, + }, + }, + }, + "borderw": { + "struct": "i", + "name": "Border Width", + "vis": True, + "style": { + -1: { + "ignore": True, + }, + 1: { + "ignore": False, + }, + }, + }, + "mode": { + "name": "Direction", + "struct": "i", + "vis": True, + "mapping": { + 0: "horizontal", + 1: "vertical", + }, + "type": { + -1: { + "ignore": True, + }, + 1: { + "ignore": False, + }, + }, + }, + "maxval": { + "name": "Upper range limit", + "struct": "i", + "type": { + -1: { + "ignore": True, + }, + 1: { + "ignore": False, + }, + }, + }, + "minval": { + "name": "Lower range limit", + "struct": "i", + "type": { + -1: { + "ignore": True, + }, + 1: { + "ignore": False, + }, + }, + }, + "drag": { + "name": "Dragging", + "struct": "i", + "model": { + "T": { + "ignore": True, + }, + "K": "T", + "P": { + "type": { + 121: {# Page + "ignore": True + }, + }, + }, + }, + }, + "disup": { + "name": "Disable release event after dragging", + "struct": "i", + "model": { + "T": { + "ignore": True + }, + "K": "T", + "P": { + "type": { + 121: {# Page + "ignore": True + }, + }, + "drag": { + 0: { + "ignore": True + } + } + }, + }, + }, + "aph": { + "name": "Opacity", + "struct": "i", + "vis": True, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + }, + }, + "first": { + "name": "Effect Priority", + "struct": "i", + "vis": True, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + "P": { + "effect": { + 0: { + "ignore": True, + }, + }, + }, + }, + }, + "time": { + "name": "Effect Time", + "struct": "i", + "vis": True, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + "P": { + "effect": { + 0: { + "ignore": True, + }, + }, + }, + }, + }, + "sendkey": { + "name": "Send Component ID", + "struct": "i", + "mapping": { + 0: "disabled", + 1: "on release", + 2: "on press", + 3: "on press and release", + }, + }, + "movex": { + "name": "", + "struct": "i", + "vis": True, + "ignore": True + }, + "movey": { + "name": "", + "struct": "i", + "vis": True, + "ignore": True + }, + "endx": { + "name": "", + "struct": "i", + "vis": True, + "ignore": True + }, + "endy": { + "name": "", + "struct": "i", + "vis": True, + "ignore": True + }, + "effect": { + "name": "Effect", + "struct": "i", + "vis": True, + "mapping": { + 0: "load", + 1: "top fly into", + 2: "bottom fly into", + 3: "left fly into", + 4: "right fly into", + 5: "top left fly into", + 6: "top right fly into", + 7: "bottom left fly into", + 8: "bottom right fly into", + 9: "fade into the gradual change", + 10: "middle zoom", + }, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + }, + }, + "lockobj": { + "name": "Locked", + "struct": "i", + "mapping": { + 0: "no", + 1: "yes", + }, + "type": { + -1: { + "ignore": True, + }, + 121: { + "ignore": False, + }, + }, + }, + "groupid0": { + "struct": "i", + "ignore": True + }, + "groupid1": { + "struct": "i", + "ignore": True + }, + "ch": { + "struct": "i", + "ignore": True, + "type": { + 0: {# Waveform + "ignore": False, + }, + }, + "name": "Channel count", + }, + "gdc": { + "struct": "i", + "name": "Grid Color", + "vis": True, + }, + "gdw": { + "struct": "i", + "name": "Grid hor. spacing", + "vis": True, + }, + "gdh": { + "struct": "i", + "name": "Grid ver. spacing", + "vis": True, + }, + "wid": { + "struct": "i", + "vis": True, + "type": { + 1: {# Slider + "name": "Cursor width", + "mapping": { + 255: "auto", + }, + }, + 122: {# Gauge + "model": { + -1: { + "ignore": True, + }, + "P": { + "ignore": False, + "name": "Gauge Thickness", + }, + }, + }, + }, + }, + "hig": { + "struct": "i", + "vis": True, + "type": { + 1: {# Slider + "name": "Cursor height", + }, + 122: {# Gauge + "model": { + -1: { + "ignore": True, + }, + "P": { + "ignore": False, + "name": "Center circle dia.", + }, + }, + }, + }, + }, + "up": { + "name": "Swide up page ID", + "struct": "i", + "mapping": { + 255: "disabled", + }, + "type": { + 122: { # Gauge + "vis": True, + "name": "Head Length", + "mapping": { + 32767: "auto", + }, + }, + }, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + }, + }, + "down": { + "name": "Swide down page ID", + "struct": "i", + "mapping": { + 255: "disabled", + }, + "type": { + 122: { # Gauge + "vis": True, + "name": "Foot Length" + }, + }, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + }, + }, + "left": { + "name": "Swide left page ID", + "struct": "i", + "mapping": { + 255: "disabled", + }, + "type": { + 122: { # Gauge + "vis": True, + "name": "Head off-center" + }, + }, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + }, + }, + "right": { + "name": "Swide right page ID", + "struct": "i", + "mapping": { + 255: "disabled", + }, + "type": { + 122: { # Gauge + "vis": True, + "name": "Gauge Head Length" + }, + }, + "model": { + "T": { + "ignore": True, + }, + "K": "T", + }, + }, + "objWid": { + "struct": "i", + "ignore": True, + }, + "objHig": { + "struct": "i", + "ignore": True, + }, + "inittrue": { + "struct": "i", + "ignore": True, + }, + "molloc": { + "struct": "i", + "ignore": True, + }, + "molloc_s": { + "struct": "i", + "ignore": True, + }, + } + + def __init__(self, raw, modelSeries="T"): + self.components = [] + self.data = dict() + self.rawData = dict() + self.sloc = 0 + self.uniqueSloc = set() + self.propNameMaxLength = 0 + self.raw = raw + self.modelSeries = modelSeries + self.loadRawProperties() + + def __repr__(self): + repr = self.rawData["att"]["objname"] + data = self.parseRawProperties(customInclude=("type",), inplace=False) + if data and "Attributes" in data and Component.attributes["type"]["name"] in data["Attributes"]: + repr = data["Attributes"][Component.attributes["type"]["name"]] + " " + repr + return repr + + def getText(self, *args, **kwargs): + return "".join(self.getTextLines(*args, **kwargs)) + + def getTextLines(self, indentLevel=0, indent=4, emptyLinesLimit=1, + customExclude=("type", "objname"), **kwargs): + # Initialize resulting IndentList + result = IndentList() + result.indentStr = " " + result.indentLevel = indentLevel + result.indent = indent + result.emptyLinesLimit = emptyLinesLimit + result.appendIndentLine(self.__repr__()) + result.indentLevel += 1 + + # Parse rawData according to the given parameters + self.parseRawProperties(customExclude=customExclude, **kwargs) + if "Attributes" in self.data: + result.appendIndentLine("Attributes") + result.indentLevel += 1 + propNameMaxLength = max([len(k) for k in self.data["Attributes"].keys()]) + for prop, val in self.data["Attributes"].items(): + try: + val = val.replace("\r\n", "\\r\\n") + except: + pass + line = prop.ljust(propNameMaxLength, " ") + ": " + str(val) + result.appendIndentLine(line) + result.indentLevel -= 1 + result.appendIndentLine("") + if "Events" in self.data: + result.appendIndentLine("Events") + result.indentLevel += 1 + for event, code in self.data["Events"].items(): + code: str + result.appendIndentLine(event) + result.indentLevel += 1 + codeLines = code.split("\n") + for cl in codeLines: + originalLength = len(cl) + clStripped = cl.lstrip(" ") + clIndentLevel = (originalLength - len(clStripped)) // 2 + clStripped = result.indentStr * result.indent * clIndentLevel + clStripped + result.appendIndentLine(clStripped) + result.indentLevel -= 1 + result.appendIndentLine("") + result.indentLevel -=1 + result.appendIndentLine("") + return result + + def parseRawProperties(self, customInclude=tuple(), customExclude=tuple(), + includeVisual:bool=False, includeUnknown:int=0, + inplace=True, emptyEvents=False, + keepNames=False, keepValues=False, **kwargs): + + data = dict() + # Model name is considered as an "attribute", too. (needed to know the right interpretation; see below) + self.rawData["att"]["model"] = self.modelSeries + attributes = dict() + # The interpretation of any attribute can depend on other attributes. (see code below) + dependencies = set(Component.attributes.keys()) + dependencies.add("model") + for attName, attData in self.rawData["att"].items(): + if attName in customExclude: + continue + if attName in Component.attributes.keys(): + # Build dictionary that interpretes and ignores the right attributes. + # attProperties = dict() + # attProperties.update(self.attributes[attName]) + # Enforce deep copy + attProperties = copy.deepcopy(Component.attributes[attName]) + done = False + while not done: + done = True + keys = [k for k in attProperties.keys()] + for d in keys: + if d in dependencies: + done = False + if d in self.rawData["att"]: + val = self.rawData["att"][d] + foundVal = True + if val in attProperties[d]: + i = val + elif -1 in attProperties[d]: + i = -1 + else: + foundVal = False + if foundVal: + while not type(attProperties[d][i]) is dict: + vOld = i + i = attProperties[d][i] + attProperties[d].pop(vOld) + attProperties.update(attProperties[d][i]) + attProperties.pop(d) + if customInclude and attName not in customInclude: + attProperties["ignore"] = True + if ("vis" in attProperties and attProperties["vis"]) and not includeVisual: + attProperties["ignore"] = True + if (not "ignore" in attProperties or not attProperties["ignore"]): + if "name" in attProperties and not keepNames: + attName = attProperties["name"] + if "mapping" in attProperties and not keepValues: + if attData in attProperties["mapping"]: + attData = attProperties["mapping"][attData] + attributes[attName] = attData + elif attName != "model" and (includeUnknown or attName in customInclude): + if not attName in customInclude: + attName = "UNKNOWN " + attName + if len(attData) > 4 or includeUnknown == 2:#raw + attData = attData.decode("iso_8859_1") + elif includeUnknown == 3:#hex + attData = " ".join([hex(d)[2:] for d in attData]) + elif len(attData) <= 4: + val = 0 + for b in reversed(attData): + val = (val << 8) + b + attData = val + attributes[attName] = attData + data["Attributes"] = attributes + # model "attribute" is no longer needed and doesnt belong here anymore + self.rawData["att"].pop("model") + for attName, attData in self.rawData.items(): + if not attName.startswith("codes") or (not includeUnknown and attName not in Component.codeEvents): + continue + if not emptyEvents and not attData: + continue + if not "Events" in data: + data["Events"] = dict() + if attName in Component.codeEvents: + attName = Component.codeEvents[attName] + data["Events"][attName] = attData + if inplace: + self.data = data + else: + return data + + def loadRawProperties(self): + # First level parsing. Find all property entries + index = 0 + properties = list() + while index < len(self.raw): + length = struct.unpack_from("