From 2a8592ef10c438ef3262f07617407f47ffc61cc4 Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Sat, 21 May 2022 14:48:42 +0000 Subject: [PATCH] Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) --- HMI/US/landscape/diff-eu-version.txt | 8 +- HMI/US/portrait/diff-eu-version.txt | 331 +---------------- HMI/US/portrait/diff-filtered.txt | 333 +----------------- .../n2t-out-visual/nspanel_US_P_Stats.txt | 24 +- .../portrait/n2t-out-visual/pageStartup.txt | 4 + HMI/US/portrait/n2t-out-visual/popupLight.txt | 279 +++------------ .../portrait/n2t-out-visual/screensaver.txt | 4 + HMI/US/portrait/n2t-out/pageStartup.txt | 4 + HMI/US/portrait/n2t-out/popupLight.txt | 279 +++------------ HMI/US/portrait/n2t-out/screensaver.txt | 4 + 10 files changed, 131 insertions(+), 1139 deletions(-) diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index 241112af..5b1fe25f 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-05-21 14:37:10.876301404 +0000 -+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-05-21 14:37:11.776302770 +0000 +--- HMI/n2t-out/Program.s.txt 2022-05-21 14:48:41.110663520 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-05-21 14:48:42.006669223 +0000 @@ -11,6 +11,4 @@ // dim value int dimValue=40 @@ -9,8 +9,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt - lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-05-21 14:37:10.880301410 +0000 -+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-05-21 14:37:11.776302770 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-05-21 14:48:41.110663520 +0000 ++++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-05-21 14:48:42.006669223 +0000 @@ -177,7 +177,7 @@ recmod=1 bauds=115200 diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index ad5aae42..399122f5 100644 --- a/HMI/US/portrait/diff-eu-version.txt +++ b/HMI/US/portrait/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-05-21 14:37:10.876301404 +0000 -+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-21 14:37:11.312302066 +0000 +--- HMI/n2t-out/Program.s.txt 2022-05-21 14:48:41.110663520 +0000 ++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-21 14:48:41.554666346 +0000 @@ -11,6 +11,6 @@ // dim value int dimValue=40 @@ -11,8 +11,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt + //lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt ---- HMI/n2t-out/cardEntities.txt 2022-05-21 14:37:10.880301410 +0000 -+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-21 14:37:11.316302072 +0000 +--- HMI/n2t-out/cardEntities.txt 2022-05-21 14:48:41.114663546 +0000 ++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-21 14:48:41.554666346 +0000 @@ -62,6 +62,16 @@ vis bText4,0 vis hSlider4,0 @@ -449,8 +449,8 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt if(tInstruction.txt=="pageType") { diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt ---- HMI/n2t-out/cardQR.txt 2022-05-21 14:37:10.880301410 +0000 -+++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-21 14:37:11.316302072 +0000 +--- HMI/n2t-out/cardQR.txt 2022-05-21 14:48:41.110663520 +0000 ++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-21 14:48:41.554666346 +0000 @@ -137,7 +137,7 @@ Disable release event after dragging: 0 Send Component ID : disabled @@ -470,8 +470,8 @@ diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt Button bNext diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-05-21 14:37:10.880301410 +0000 -+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-21 14:37:11.312302066 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-05-21 14:48:41.110663520 +0000 ++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-21 14:48:41.554666346 +0000 @@ -142,7 +142,7 @@ Disable release event after dragging: 0 Send Component ID : disabled @@ -490,318 +490,3 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt //send calc crc btlen tSend.txt,sys0 crcrest 1,0xffff // reset CRC -@@ -330,10 +330,6 @@ - { - page cardAlarm - } -- if(tId.txt=="cardQR") -- { -- page cardQR -- } - } - // end of user code - udelete payloadLength-1 -diff -bur HMI/n2t-out/popupLight.txt HMI/US/portrait/n2t-out/popupLight.txt ---- HMI/n2t-out/popupLight.txt 2022-05-21 14:37:10.880301410 +0000 -+++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-21 14:37:11.312302066 +0000 -@@ -12,43 +12,244 @@ - - Events - Preinitialize Event -- //get entitiy name -- tEntity.txt=pageIcons.tTmp1.txt -- //get entity id -- entn.txt=pageIcons.tTmp2.txt -- vis p0,0 -- vis tSend,0 -- vis tTmp,0 -- vis tInstruction,0 -- vis tId,0 -- //page open event -- // event,pageOpenDetail,typeOfPage,tEntityName -- // craft command -- tSend.txt="event,pageOpenDetail,popupLight,"+entn.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 -- //disable brightness by default -+ // data available -+ if(usize>1) -+ { -+ bufferPos=0 -+ while(bufferPos isn't supported -+ if(tTmp.txt=="disable") -+ { - vis t0,0 -+ vis bColor,0 - vis pColorWheel,0 -- //vis t0,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++ -+ } -+ } - - Variable (string) strCommand - Attributes -@@ -618,10 +819,6 @@ - { - page cardAlarm - } -- if(tId.txt=="cardQR") -- { -- page cardQR -- } - } - // end of user code - udelete payloadLength-1 -diff -bur HMI/n2t-out/screensaver.txt HMI/US/portrait/n2t-out/screensaver.txt ---- HMI/n2t-out/screensaver.txt 2022-05-21 14:37:10.880301410 +0000 -+++ HMI/US/portrait/n2t-out/screensaver.txt 2022-05-21 14:37:11.316302072 +0000 -@@ -607,10 +607,6 @@ - { - page cardAlarm - } -- if(tId.txt=="cardQR") -- { -- page cardQR -- } - } - // end of user code - udelete payloadLength-1 diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index a3a1a3ba..ec3643e4 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,8 +1,8 @@ -+++ HMI/US/portrait/diff-eu-version.txt 2022-05-21 14:37:11.332302096 +0000 -+--- HMI/n2t-out/Program.s.txt 2022-05-21 14:37:10.876301404 +0000 -++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-21 14:37:11.312302066 +0000 -+--- HMI/n2t-out/cardEntities.txt 2022-05-21 14:37:10.880301410 +0000 -++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-21 14:37:11.316302072 +0000 ++++ HMI/US/portrait/diff-eu-version.txt 2022-05-21 14:48:41.566666422 +0000 ++--- HMI/n2t-out/Program.s.txt 2022-05-21 14:48:41.110663520 +0000 +++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-21 14:48:41.554666346 +0000 ++--- HMI/n2t-out/cardEntities.txt 2022-05-21 14:48:41.114663546 +0000 +++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-21 14:48:41.554666346 +0000 + Hotspot mSwipeNext + Scope : local +@@ -1816,6 +2044,150 @@ @@ -29,8 +29,8 @@ ++ tsw bDown5,1 ++ } +diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt -+--- HMI/n2t-out/cardQR.txt 2022-05-21 14:37:10.880301410 +0000 -++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-21 14:37:11.316302072 +0000 ++--- HMI/n2t-out/cardQR.txt 2022-05-21 14:48:41.110663520 +0000 +++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-21 14:48:41.554666346 +0000 +@@ -137,7 +137,7 @@ + Disable release event after dragging: 0 + Send Component ID : disabled @@ -49,320 +49,5 @@ + Max. Text Size : 105 + + Button bNext -+--- HMI/n2t-out/pageStartup.txt 2022-05-21 14:37:10.880301410 +0000 -++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-21 14:37:11.312302066 +0000 -+@@ -330,10 +330,6 @@ -+ { -+ page cardAlarm -+ } -+- if(tId.txt=="cardQR") -+- { -+- page cardQR -+- } -+ } -+ // end of user code -+ udelete payloadLength-1 -+diff -bur HMI/n2t-out/popupLight.txt HMI/US/portrait/n2t-out/popupLight.txt -+--- HMI/n2t-out/popupLight.txt 2022-05-21 14:37:10.880301410 +0000 -++++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-21 14:37:11.312302066 +0000 -+@@ -12,43 +12,244 @@ -+ -+ Events -+ Preinitialize Event -+- //get entitiy name -+- tEntity.txt=pageIcons.tTmp1.txt -+- //get entity id -+- entn.txt=pageIcons.tTmp2.txt -+- vis p0,0 -+- vis tSend,0 -+- vis tTmp,0 -+- vis tInstruction,0 -+- vis tId,0 -+- //page open event -+- // event,pageOpenDetail,typeOfPage,tEntityName -+- // craft command -+- tSend.txt="event,pageOpenDetail,popupLight,"+entn.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 -+- //disable brightness by default -++ // data available -++ if(usize>1) -++ { -++ bufferPos=0 -++ while(bufferPos isn't supported -++ if(tTmp.txt=="disable") -++ { -+ vis t0,0 -++ vis bColor,0 -+ vis pColorWheel,0 -+- //vis t0,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++ -++ } -++ } -+ -+ Variable (string) strCommand -+ Attributes -+@@ -618,10 +819,6 @@ -+ { -+ page cardAlarm -+ } -+- if(tId.txt=="cardQR") -+- { -+- page cardQR -+- } -+ } -+ // end of user code -+ udelete payloadLength-1 -+diff -bur HMI/n2t-out/screensaver.txt HMI/US/portrait/n2t-out/screensaver.txt -+--- HMI/n2t-out/screensaver.txt 2022-05-21 14:37:10.880301410 +0000 -++++ HMI/US/portrait/n2t-out/screensaver.txt 2022-05-21 14:37:11.316302072 +0000 -+@@ -607,10 +607,6 @@ -+ { -+ page cardAlarm -+ } -+- if(tId.txt=="cardQR") -+- { -+- page cardQR -+- } -+ } -+ // end of user code -+ udelete payloadLength-1 ++--- HMI/n2t-out/pageStartup.txt 2022-05-21 14:48:41.110663520 +0000 +++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-21 14:48:41.554666346 +0000 diff --git a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt index 4bc509bc..a8109993 100644 --- a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt +++ b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt @@ -14,22 +14,18 @@ popupNotify 17 Component(s) 200 Line(s) of event code 125 Unique line(s) of event code +pageStartup + 19 Component(s) + 154 Line(s) of event code + 115 Unique line(s) of event code popupShutter 20 Component(s) 197 Line(s) of event code 111 Unique line(s) of event code popupLight 27 Component(s) - 507 Line(s) of event code - 170 Unique line(s) of event code -pageStartup - 19 Component(s) - 150 Line(s) of event code - 113 Unique line(s) of event code -screensaver - 35 Component(s) - 292 Line(s) of event code - 235 Unique line(s) of event code + 345 Line(s) of event code + 187 Unique line(s) of event code cardThermo 56 Component(s) 546 Line(s) of event code @@ -46,6 +42,10 @@ cardGrid 42 Component(s) 439 Line(s) of event code 254 Unique line(s) of event code +screensaver + 35 Component(s) + 296 Line(s) of event code + 237 Unique line(s) of event code cardQR 30 Component(s) 363 Line(s) of event code @@ -58,5 +58,5 @@ cardEntities Total 13 Page(s) 414 Component(s) - 4715 Line(s) of event code - 1172 Unique line(s) of event code + 4561 Line(s) of event code + 1182 Unique line(s) of event code diff --git a/HMI/US/portrait/n2t-out-visual/pageStartup.txt b/HMI/US/portrait/n2t-out-visual/pageStartup.txt index f49219cc..ddbc233b 100644 --- a/HMI/US/portrait/n2t-out-visual/pageStartup.txt +++ b/HMI/US/portrait/n2t-out-visual/pageStartup.txt @@ -625,6 +625,10 @@ Timer tmSerial { page cardAlarm } + if(tId.txt=="cardQR") + { + page cardQR + } } // end of user code udelete payloadLength-1 diff --git a/HMI/US/portrait/n2t-out-visual/popupLight.txt b/HMI/US/portrait/n2t-out-visual/popupLight.txt index 6ef9636f..3d5b2156 100644 --- a/HMI/US/portrait/n2t-out-visual/popupLight.txt +++ b/HMI/US/portrait/n2t-out-visual/popupLight.txt @@ -20,244 +20,43 @@ Page popupLight Events Preinitialize Event - // data available - if(usize>1) - { - 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++ - } - } + //get entitiy name + tEntity.txt=pageIcons.tTmp1.txt + //get entity id + entn.txt=pageIcons.tTmp2.txt + vis p0,0 + vis tSend,0 + vis tTmp,0 + vis tInstruction,0 + vis tId,0 + //page open event + // event,pageOpenDetail,typeOfPage,tEntityName + // craft command + tSend.txt="event,pageOpenDetail,popupLight,"+entn.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 + //disable brightness by default + vis t1,0 + vis t2,0 + vis hBrightness,0 + //disable color temp by default + vis t4,0 + vis t3,0 + vis hTempSlider,0 + //disable color wheel components by default + vis bColor,0 + vis t0,0 + vis pColorWheel,0 + //vis t0,0 Variable (string) strCommand Attributes @@ -1165,6 +964,10 @@ Timer tmSerial { page cardAlarm } + if(tId.txt=="cardQR") + { + page cardQR + } } // end of user code udelete payloadLength-1 diff --git a/HMI/US/portrait/n2t-out-visual/screensaver.txt b/HMI/US/portrait/n2t-out-visual/screensaver.txt index 4b4b1ac3..cb7debc3 100644 --- a/HMI/US/portrait/n2t-out-visual/screensaver.txt +++ b/HMI/US/portrait/n2t-out-visual/screensaver.txt @@ -1131,6 +1131,10 @@ Timer tmSerial { page cardAlarm } + if(tId.txt=="cardQR") + { + page cardQR + } } // end of user code udelete payloadLength-1 diff --git a/HMI/US/portrait/n2t-out/pageStartup.txt b/HMI/US/portrait/n2t-out/pageStartup.txt index bcd74fdc..8c5a41dc 100644 --- a/HMI/US/portrait/n2t-out/pageStartup.txt +++ b/HMI/US/portrait/n2t-out/pageStartup.txt @@ -330,6 +330,10 @@ Timer tmSerial { page cardAlarm } + if(tId.txt=="cardQR") + { + page cardQR + } } // end of user code udelete payloadLength-1 diff --git a/HMI/US/portrait/n2t-out/popupLight.txt b/HMI/US/portrait/n2t-out/popupLight.txt index 2e0e207b..3e3da25b 100644 --- a/HMI/US/portrait/n2t-out/popupLight.txt +++ b/HMI/US/portrait/n2t-out/popupLight.txt @@ -12,244 +12,43 @@ Page popupLight Events Preinitialize Event - // data available - if(usize>1) - { - 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++ - } - } + //get entitiy name + tEntity.txt=pageIcons.tTmp1.txt + //get entity id + entn.txt=pageIcons.tTmp2.txt + vis p0,0 + vis tSend,0 + vis tTmp,0 + vis tInstruction,0 + vis tId,0 + //page open event + // event,pageOpenDetail,typeOfPage,tEntityName + // craft command + tSend.txt="event,pageOpenDetail,popupLight,"+entn.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 + //disable brightness by default + vis t1,0 + vis t2,0 + vis hBrightness,0 + //disable color temp by default + vis t4,0 + vis t3,0 + vis hTempSlider,0 + //disable color wheel components by default + vis bColor,0 + vis t0,0 + vis pColorWheel,0 + //vis t0,0 Variable (string) strCommand Attributes @@ -819,6 +618,10 @@ Timer tmSerial { page cardAlarm } + if(tId.txt=="cardQR") + { + page cardQR + } } // end of user code udelete payloadLength-1 diff --git a/HMI/US/portrait/n2t-out/screensaver.txt b/HMI/US/portrait/n2t-out/screensaver.txt index 57c23fe5..48a71dd0 100644 --- a/HMI/US/portrait/n2t-out/screensaver.txt +++ b/HMI/US/portrait/n2t-out/screensaver.txt @@ -607,6 +607,10 @@ Timer tmSerial { page cardAlarm } + if(tId.txt=="cardQR") + { + page cardQR + } } // end of user code udelete payloadLength-1