diff --git a/HMI/n2t-out/Program.s.txt b/HMI/n2t-out/Program.s.txt index 36907784..0ea4a9f5 100644 --- a/HMI/n2t-out/Program.s.txt +++ b/HMI/n2t-out/Program.s.txt @@ -5,24 +5,11 @@ Program.s int recvCrc=0 int payloadLength=0 int par0=0,par1=0 - // landsspace orientation x has 480px and y has 320px xy limits todo: adjust xy values to something that fit's resulution - //Maximum values in directional change for Swipes beeing detected as swipe (diagonal swipes are invalid) (for one axis at a time) - int xLimit=125,yLimit=125 - int ixLimit=-125,iyLimit=-125 - //Minimum values for swipes, directional changes below theese values are ignored, because they could be unintended swipes - int xLimitMin=80,yLimitMin=80 - int ixLimitMin=-80,iyLimitMin=-80 - // Swipe Result Vars - int ycR=0,xcR=0 - // Start End Swipe Touch Locations - int yc1=0,xc1=0,yc2=0,xc2=0 // sleep timeout in s int sleepTimeout=20 int sleepValue=0 // dim value int dimValue=40 - // current page - int nPage=0 // fix touch offset lcd_dev fffb 0002 0000 0020 page pageStartup diff --git a/HMI/n2t-out/cardAlarm.txt b/HMI/n2t-out/cardAlarm.txt index e1557b88..db7e0546 100644 --- a/HMI/n2t-out/cardAlarm.txt +++ b/HMI/n2t-out/cardAlarm.txt @@ -324,14 +324,7 @@ Button bNext Events Touch Press Event - nPage=nPage+1 - nPageDisp.val=nPage - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardAlarm,bNext" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -378,14 +371,7 @@ Button bPrev Events Touch Press Event - nPage=nPage-1 - nPageDisp.val=nPage - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardAlarm,bPrev" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff --git a/HMI/n2t-out/cardEntities.txt b/HMI/n2t-out/cardEntities.txt index 11928259..9ed5176c 100644 --- a/HMI/n2t-out/cardEntities.txt +++ b/HMI/n2t-out/cardEntities.txt @@ -1131,13 +1131,14 @@ Button bPrev Events Touch Press Event - nPage=nPage-1 - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardEntities," + if(bPrev.isbr==1) + { + tSend.txt+="bBack" + }else + { + tSend.txt+="bPrev" + } //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -1184,13 +1185,7 @@ Button bNext Events Touch Press Event - nPage=nPage+1 - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardEntities,bNext" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -1776,6 +1771,27 @@ Timer tmSerial if(tInstruction.txt=="entityUpdHeading") { spstr strCommand.txt,tHeading.txt,",",1 + spstr strCommand.txt,tTmp.txt,",",2 + if(tTmp.txt=="0") + { + vis bPrev,0 + }else + { + vis bPrev,1 + if(tTmp.txt=="2") + { + bPrev.txt="" + bPrev.isbr=1 + } + } + spstr strCommand.txt,tTmp.txt,",",3 + if(tTmp.txt=="0") + { + vis bNext,0 + }else + { + vis bNext,1 + } } if(tInstruction.txt=="entityUpd") { diff --git a/HMI/n2t-out/cardGrid.txt b/HMI/n2t-out/cardGrid.txt index ba246587..1a6ef987 100644 --- a/HMI/n2t-out/cardGrid.txt +++ b/HMI/n2t-out/cardGrid.txt @@ -515,13 +515,7 @@ Button bPrev Events Touch Press Event - nPage=nPage-1 - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardGrid,bPrev" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -568,13 +562,7 @@ Button bNext Events Touch Press Event - nPage=nPage+1 - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardGrid,bNext" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff --git a/HMI/n2t-out/cardMedia.txt b/HMI/n2t-out/cardMedia.txt index e03c53d4..19f60e65 100644 --- a/HMI/n2t-out/cardMedia.txt +++ b/HMI/n2t-out/cardMedia.txt @@ -23,55 +23,24 @@ Page cardMedia vis p0,0 vis tSend,0 vis tInstruction,0 - vis nPageDisp,0 vis tTmp,0 vis tId,0 //vis nPageDisp,0 Variable (string) strCommand Attributes - ID : 8 + ID : 7 Scope : local Text : Max. Text Size: 200 Variable (string) entn Attributes - ID : 19 + ID : 18 Scope : local Text : Max. Text Size: 50 -Number nPageDisp - Attributes - ID : 6 - Scope : local - Dragging : 0 - Disable release event after dragging: 0 - Send Component ID : disabled - Opacity : 127 - x coordinate : 426 - y coordinate : 0 - Width : 42 - Height : 24 - 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 - Value : 0 - Significant digits shown : all - Format : decimal - Word wrap : enabled - Horizontal Spacing : 0 - Vertical Spacing : 0 - Text tSend Attributes ID : 2 @@ -134,7 +103,7 @@ Text tTmp Text tInstruction Attributes - ID : 9 + ID : 8 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -164,7 +133,7 @@ Text tInstruction Text tId Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -194,7 +163,7 @@ Text tId Text tHeading Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -224,7 +193,7 @@ Text tHeading Text tTitle Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -254,7 +223,7 @@ Text tTitle Text tAuthor Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -284,7 +253,7 @@ Text tAuthor Text t2 Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -333,7 +302,7 @@ Text t2 Text tPlayPause Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -382,7 +351,7 @@ Text tPlayPause Text t0 Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -431,7 +400,7 @@ Text t0 Text tIcon Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -478,7 +447,7 @@ Picture p0 Slider hVolume Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -554,14 +523,7 @@ Button bNext Events Touch Press Event - nPage=nPage+1 - nPageDisp.val=nPage - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardMedia,bNext" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -608,14 +570,7 @@ Button bPrev Events Touch Press Event - nPage=nPage-1 - nPageDisp.val=nPage - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardMedia,bPrev" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -630,7 +585,7 @@ Button bPrev Timer tmSerial Attributes - ID : 7 + ID : 6 Scope : local Period (ms): 50 Enabled : yes @@ -791,7 +746,7 @@ Timer tmSerial Timer tmSleep Attributes - ID : 20 + ID : 19 Scope : local Period (ms): 1000 Enabled : yes @@ -811,7 +766,7 @@ Timer tmSleep TouchCap tc0 Attributes - ID : 21 + ID : 20 Scope: local Value: 0 diff --git a/HMI/n2t-out/cardThermo.txt b/HMI/n2t-out/cardThermo.txt index 15c24aa6..45818e84 100644 --- a/HMI/n2t-out/cardThermo.txt +++ b/HMI/n2t-out/cardThermo.txt @@ -559,14 +559,7 @@ Button bNext Events Touch Press Event - nPage=nPage+1 - nPageDisp.val=nPage - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardThermo,bNext" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC @@ -721,14 +714,7 @@ Button bPrev Events Touch Press Event - nPage=nPage-1 - nPageDisp.val=nPage - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,cardThermo,bPrev" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff --git a/HMI/n2t-out/nspanel_Stats.txt b/HMI/n2t-out/nspanel_Stats.txt index 98785905..5634a108 100644 --- a/HMI/n2t-out/nspanel_Stats.txt +++ b/HMI/n2t-out/nspanel_Stats.txt @@ -1,66 +1,62 @@ Program.s 0 Component(s) - 17 Line(s) of event code - 17 Unique line(s) of event code + 10 Line(s) of event code + 10 Unique line(s) of event code pageIcons 6 Component(s) 0 Line(s) of event code 0 Unique line(s) of event code +pageTest + 13 Component(s) + 13 Line(s) of event code + 13 Unique line(s) of event code pageSerialTest 13 Component(s) 48 Line(s) of event code 43 Unique line(s) of event code -popupNotify - 17 Component(s) - 180 Line(s) of event code - 119 Unique line(s) of event code -pageStartup - 19 Component(s) - 146 Line(s) of event code - 111 Unique line(s) of event code -cardMedia - 22 Component(s) - 200 Line(s) of event code - 115 Unique line(s) of event code -pageSwipeTest - 18 Component(s) - 62 Line(s) of event code - 44 Unique line(s) of event code popupShutter 19 Component(s) - 180 Line(s) of event code - 103 Unique line(s) of event code -pageTest - 14 Component(s) - 14 Line(s) of event code - 14 Unique line(s) of event code -screensaver - 25 Component(s) - 173 Line(s) of event code - 124 Unique line(s) of event code -popupLight - 26 Component(s) - 307 Line(s) of event code - 168 Unique line(s) of event code -cardThermo - 42 Component(s) - 412 Line(s) of event code - 221 Unique line(s) of event code -cardGrid - 39 Component(s) - 382 Line(s) of event code - 221 Unique line(s) of event code -cardEntities - 54 Component(s) - 728 Line(s) of event code - 317 Unique line(s) of event code + 179 Line(s) of event code + 102 Unique line(s) of event code +popupNotify + 17 Component(s) + 179 Line(s) of event code + 118 Unique line(s) of event code +pageStartup + 19 Component(s) + 150 Line(s) of event code + 113 Unique line(s) of event code cardAlarm 35 Component(s) - 259 Line(s) of event code - 163 Unique line(s) of event code + 253 Line(s) of event code + 160 Unique line(s) of event code +cardGrid + 39 Component(s) + 378 Line(s) of event code + 219 Unique line(s) of event code +cardThermo + 42 Component(s) + 406 Line(s) of event code + 218 Unique line(s) of event code +cardMedia + 21 Component(s) + 193 Line(s) of event code + 111 Unique line(s) of event code +cardEntities + 54 Component(s) + 752 Line(s) of event code + 330 Unique line(s) of event code +popupLight + 26 Component(s) + 306 Line(s) of event code + 167 Unique line(s) of event code +screensaver + 25 Component(s) + 166 Line(s) of event code + 121 Unique line(s) of event code Total - 14 Page(s) - 349 Component(s) - 3108 Line(s) of event code - 828 Unique line(s) of event code + 13 Page(s) + 329 Component(s) + 3033 Line(s) of event code + 806 Unique line(s) of event code diff --git a/HMI/n2t-out/pageStartup.txt b/HMI/n2t-out/pageStartup.txt index 38919eb7..09b00a7e 100644 --- a/HMI/n2t-out/pageStartup.txt +++ b/HMI/n2t-out/pageStartup.txt @@ -402,7 +402,7 @@ Text tVersion Horizontal Alignment : center Vertical Alignment : center Input Type : character - Text : 16 + Text : 17 Max. Text Size : 10 Word wrap : disabled Horizontal Spacing : 0 @@ -592,6 +592,10 @@ Timer tmSerial { page cardThermo } + if(tId.txt=="screensaver") + { + page screensaver + } if(tId.txt=="popupLight") { pageIcons.tTmp1.txt=tTmp.txt diff --git a/HMI/n2t-out/pageTest.txt b/HMI/n2t-out/pageTest.txt index 1c0cc58d..54098892 100644 --- a/HMI/n2t-out/pageTest.txt +++ b/HMI/n2t-out/pageTest.txt @@ -111,45 +111,9 @@ Button b1 Touch Press Event page pageSerialTest -Button b2 - Attributes - ID : 4 - Scope : local - Dragging : 0 - Disable release event after dragging: 0 - Send Component ID : disabled - Opacity : 127 - x coordinate : 7 - y coordinate : 265 - Width : 100 - Height : 50 - Effect : load - Effect Priority : 0 - Effect Time : 300 - Fill : solid color - Style : 3D auto - Font ID : 4 - Back. Color : 50712 - Back. Picture ID (Pressed) : 65535 - Back. Color (Pressed) : 1024 - Font Color (Unpressed) : 0 - Font Color (Pressed) : 65535 - Horizontal Alignment : center - Vertical Alignment : center - State : unpressed - Text : swipe - Max. Text Size : 10 - Word wrap : disabled - Horizontal Spacing : 0 - Vertical Spacing : 0 - - Events - Touch Press Event - page pageSwipeTest - Button b3 Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -185,7 +149,7 @@ Button b3 Button b6 Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -221,7 +185,7 @@ Button b6 Button b4 Attributes - ID : 7 + ID : 6 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -257,7 +221,7 @@ Button b4 Button b5 Attributes - ID : 8 + ID : 7 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -293,7 +257,7 @@ Button b5 Button b7 Attributes - ID : 9 + ID : 8 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -329,7 +293,7 @@ Button b7 Button b8 Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -366,7 +330,7 @@ Button b8 Button b9 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -402,7 +366,7 @@ Button b9 Button b10 Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -438,7 +402,7 @@ Button b10 Button b11 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Disable release event after dragging: 0 diff --git a/HMI/n2t-out/popupLight.txt b/HMI/n2t-out/popupLight.txt index 785f154b..8167240b 100644 --- a/HMI/n2t-out/popupLight.txt +++ b/HMI/n2t-out/popupLight.txt @@ -593,12 +593,7 @@ Button b0 Events Touch Press Event - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,popupLight,bExit" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff --git a/HMI/n2t-out/popupNotify.txt b/HMI/n2t-out/popupNotify.txt index 092fb756..462cb337 100644 --- a/HMI/n2t-out/popupNotify.txt +++ b/HMI/n2t-out/popupNotify.txt @@ -278,12 +278,7 @@ Button b0 Events Touch Press Event sleepTimeout=vaOldSleepT.val - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,popupNotify,bExit" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff --git a/HMI/n2t-out/popupShutter.txt b/HMI/n2t-out/popupShutter.txt index 84352b87..e832b2ee 100644 --- a/HMI/n2t-out/popupShutter.txt +++ b/HMI/n2t-out/popupShutter.txt @@ -364,12 +364,7 @@ Button b0 Events Touch Press Event - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,popupShutter,bExit" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC diff --git a/HMI/n2t-out/screensaver.txt b/HMI/n2t-out/screensaver.txt index 15120f9f..93de7693 100644 --- a/HMI/n2t-out/screensaver.txt +++ b/HMI/n2t-out/screensaver.txt @@ -32,7 +32,17 @@ Page screensaver dim=dimValue vis tSend,0 //page open event - // craft command + // clear weather elements, to keep example content in HMI + tMainIcon.txt="" + tMainText.txt="" + tMRIcon.txt="" + tMR.txt="" + tForecast1.txt="" + tF1Icon.txt="" + tForecast1Val.txt="" + tForecast2.txt="" + tF2Icon.txt="" + tForecast2Val.txt="" tSend.txt="event,screensaverOpen" //send calc crc btlen tSend.txt,sys0 @@ -45,17 +55,6 @@ Page screensaver prints sys0,2 prints tSend.txt,0 prints crcval,2 - // clear weather elements, to keep example content in HMI - tMainIcon.txt="" - tMainText.txt="" - tMRIcon.txt="" - tMR.txt="" - tForecast1.txt="" - tF1Icon.txt="" - tForecast1Val.txt="" - tForecast2.txt="" - tF2Icon.txt="" - tForecast2Val.txt="" Variable (string) strCommand Attributes @@ -260,7 +259,7 @@ Text tSend Vertical Alignment : center Input Type : character Text : - Max. Text Size : 25 + Max. Text Size : 50 Word wrap : disabled Horizontal Spacing : 0 Vertical Spacing : 0 @@ -725,14 +724,6 @@ Timer tmSerial //tForecast2Val spstr strCommand.txt,tForecast2Val.txt,"?",10 } - if(tInstruction.txt=="page") - { - //pagenumber - spstr strCommand.txt,tTmp.txt,",",1 - covx tTmp.txt,sys0,0,0 - nPage=sys0 - //don't send current page number, wake will do - } if(tInstruction.txt=="pageType") { dim=100 @@ -804,12 +795,7 @@ TouchCap tc0 Events Touch Press Event - //page open event - // event,pageOpen,cardEntities,pageNumber - // craft command - // convert pageNumber and write to tTmp - covx nPage,tTmp.txt,0,0 - tSend.txt="event,pageOpen,"+tTmp.txt + tSend.txt="event,buttonPress2,screensaver,bExit" //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC