mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
sync us-p (add nextion2text)
This commit is contained in:
committed by
github-actions[bot]
parent
31997a660f
commit
f8c91b8900
@@ -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:30:06.481412328 +0000
|
||||
+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-05-21 14:30:07.333409902 +0000
|
||||
--- 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
|
||||
@@ -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:30:06.481412328 +0000
|
||||
+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-05-21 14:30:07.337409891 +0000
|
||||
--- 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
|
||||
@@ -177,7 +177,7 @@
|
||||
recmod=1
|
||||
bauds=115200
|
||||
|
||||
@@ -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:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-21 14:30:06.897411144 +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
|
||||
@@ -11,6 +11,6 @@
|
||||
// dim value
|
||||
int dimValue=40
|
||||
@@ -10,23 +10,9 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt
|
||||
+ // fix touch offset (Removed for US version)
|
||||
+ //lcd_dev fffb 0002 0000 0020
|
||||
page pageStartup
|
||||
diff -bur HMI/n2t-out/cardAlarm.txt HMI/US/portrait/n2t-out/cardAlarm.txt
|
||||
--- HMI/n2t-out/cardAlarm.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardAlarm.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -788,10 +788,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
--- HMI/n2t-out/cardEntities.txt 2022-05-21 14:30:06.485412317 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-21 14:30:06.901411132 +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
|
||||
@@ -62,6 +62,16 @@
|
||||
vis bText4,0
|
||||
vis hSlider4,0
|
||||
@@ -311,123 +297,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
Hotspot mSwipeNext
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1277,28 +1505,6 @@
|
||||
vis bText1,0
|
||||
vis hSlider1,0
|
||||
vis nNum1,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tId.txt,"~",8
|
||||
- spstr tId.txt,tTmp.txt,"|",0
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bUp1.pco=27501
|
||||
- tsw bUp1,0
|
||||
- }else
|
||||
- {
|
||||
- bUp1.pco=65535
|
||||
- tsw bUp1,1
|
||||
- }
|
||||
- spstr tId.txt,tTmp.txt,"|",1
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bDown1.pco=27501
|
||||
- tsw bDown1,0
|
||||
- }else
|
||||
- {
|
||||
- bDown1.pco=65535
|
||||
- tsw bDown1,1
|
||||
- }
|
||||
}
|
||||
if(type1.txt=="light")
|
||||
{
|
||||
@@ -1421,28 +1627,6 @@
|
||||
vis bText2,0
|
||||
vis hSlider2,0
|
||||
vis nNum2,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tId.txt,"~",14
|
||||
- spstr tId.txt,tTmp.txt,"|",0
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bUp2.pco=27501
|
||||
- tsw bUp2,0
|
||||
- }else
|
||||
- {
|
||||
- bUp2.pco=65535
|
||||
- tsw bUp2,1
|
||||
- }
|
||||
- spstr tId.txt,tTmp.txt,"|",1
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bDown2.pco=27501
|
||||
- tsw bDown2,0
|
||||
- }else
|
||||
- {
|
||||
- bDown2.pco=65535
|
||||
- tsw bDown2,1
|
||||
- }
|
||||
}
|
||||
if(type2.txt=="light")
|
||||
{
|
||||
@@ -1565,28 +1749,6 @@
|
||||
vis bText3,0
|
||||
vis hSlider3,0
|
||||
vis nNum3,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tId.txt,"~",20
|
||||
- spstr tId.txt,tTmp.txt,"|",0
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bUp3.pco=27501
|
||||
- tsw bUp3,0
|
||||
- }else
|
||||
- {
|
||||
- bUp3.pco=65535
|
||||
- tsw bUp3,1
|
||||
- }
|
||||
- spstr tId.txt,tTmp.txt,"|",1
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bDown3.pco=27501
|
||||
- tsw bDown3,0
|
||||
- }else
|
||||
- {
|
||||
- bDown3.pco=65535
|
||||
- tsw bDown3,1
|
||||
- }
|
||||
}
|
||||
if(type3.txt=="light")
|
||||
{
|
||||
@@ -1709,28 +1871,6 @@
|
||||
vis bText4,0
|
||||
vis hSlider4,0
|
||||
vis nNum4,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tId.txt,"~",26
|
||||
- spstr tId.txt,tTmp.txt,"|",0
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bUp4.pco=27501
|
||||
- tsw bUp4,0
|
||||
- }else
|
||||
- {
|
||||
- bUp4.pco=65535
|
||||
- tsw bUp4,1
|
||||
- }
|
||||
- spstr tId.txt,tTmp.txt,"|",1
|
||||
- if(tTmp.txt=="0")
|
||||
- {
|
||||
- bDown4.pco=27501
|
||||
- tsw bDown4,0
|
||||
- }else
|
||||
- {
|
||||
- bDown4.pco=65535
|
||||
- tsw bDown4,1
|
||||
- }
|
||||
}
|
||||
if(type4.txt=="light")
|
||||
{
|
||||
@@ -1816,6 +1956,128 @@
|
||||
@@ -1816,6 +2044,150 @@
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider4.maxval=sys0
|
||||
}
|
||||
@@ -468,6 +338,28 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ vis bText5,0
|
||||
+ vis hSlider5,0
|
||||
+ vis nNum5,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tId.txt,"~",32
|
||||
+ spstr tId.txt,tTmp.txt,"|",0
|
||||
+ if(tTmp.txt=="0")
|
||||
+ {
|
||||
+ bUp5.pco=27501
|
||||
+ tsw bUp5,0
|
||||
+ }else
|
||||
+ {
|
||||
+ bUp5.pco=65535
|
||||
+ tsw bUp5,1
|
||||
+ }
|
||||
+ spstr tId.txt,tTmp.txt,"|",1
|
||||
+ if(tTmp.txt=="0")
|
||||
+ {
|
||||
+ bDown5.pco=27501
|
||||
+ tsw bDown5,0
|
||||
+ }else
|
||||
+ {
|
||||
+ bDown5.pco=65535
|
||||
+ tsw bDown5,1
|
||||
+ }
|
||||
+ }
|
||||
+ if(type5.txt=="light")
|
||||
+ {
|
||||
@@ -556,85 +448,10 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
@@ -1871,10 +2133,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
diff -bur HMI/n2t-out/cardGrid.txt HMI/US/portrait/n2t-out/cardGrid.txt
|
||||
--- HMI/n2t-out/cardGrid.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardGrid.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -869,10 +869,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
diff -bur HMI/n2t-out/cardMedia.txt HMI/US/portrait/n2t-out/cardMedia.txt
|
||||
--- HMI/n2t-out/cardMedia.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardMedia.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -740,10 +740,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt
|
||||
--- HMI/n2t-out/cardQR.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -19,16 +19,6 @@
|
||||
vis tId,0
|
||||
vis bPrev,0
|
||||
vis bNext,0
|
||||
- //ui e1
|
||||
- vis btOnOff1,0
|
||||
- vis tIcon1,0
|
||||
- vis tEntity1,0
|
||||
- vis bText1,0
|
||||
- //ui e2
|
||||
- vis btOnOff2,0
|
||||
- vis tIcon2,0
|
||||
- vis tEntity2,0
|
||||
- vis bText2,0
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
@@ -78,18 +68,6 @@
|
||||
Text :
|
||||
Max. Text Size: 80
|
||||
|
||||
-Variable (string) type1
|
||||
- Attributes
|
||||
- Scope : local
|
||||
- Text :
|
||||
- Max. Text Size: 10
|
||||
-
|
||||
-Variable (string) type2
|
||||
- Attributes
|
||||
- Scope : local
|
||||
- Text :
|
||||
- Max. Text Size: 10
|
||||
-
|
||||
Text tEntity1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -137,7 +115,7 @@
|
||||
--- 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
|
||||
@@ -137,7 +137,7 @@
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
@@ -643,7 +460,7 @@ diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt
|
||||
Max. Text Size : 40
|
||||
|
||||
Picture p0
|
||||
@@ -153,7 +131,7 @@
|
||||
@@ -153,7 +153,7 @@
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
@@ -652,175 +469,9 @@ diff -bur HMI/n2t-out/cardQR.txt HMI/US/portrait/n2t-out/cardQR.txt
|
||||
Max. Text Size : 105
|
||||
|
||||
Button bNext
|
||||
@@ -454,9 +432,8 @@
|
||||
spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
if(tInstruction.txt=="entityUpd")
|
||||
{
|
||||
- // command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
|
||||
- //tHeading
|
||||
- spstr strCommand.txt,tHeading.txt,"~",1
|
||||
+ //entn
|
||||
+ spstr strCommand.txt,entn.txt,"~",1
|
||||
// navigation icons
|
||||
spstr strCommand.txt,tId.txt,"~",2
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
@@ -486,128 +463,6 @@
|
||||
}
|
||||
//text qrcode
|
||||
spstr strCommand.txt,qr0.txt,"~",3
|
||||
- // get Type
|
||||
- spstr strCommand.txt,type1.txt,"~",4
|
||||
- // get internal name
|
||||
- spstr strCommand.txt,entn1.txt,"~",5
|
||||
- if(type1.txt=="delete"||type1.txt=="")
|
||||
- {
|
||||
- vis btOnOff1,0
|
||||
- vis tEntity1,0
|
||||
- vis tIcon1,0
|
||||
- vis bText1,0
|
||||
- }else
|
||||
- {
|
||||
- // change icon
|
||||
- spstr strCommand.txt,tIcon1.txt,"~",6
|
||||
- vis tIcon1,1
|
||||
- // change icon color
|
||||
- spstr strCommand.txt,tTmp.txt,"~",7
|
||||
- covx tTmp.txt,sys0,0,0
|
||||
- tIcon1.pco=sys0
|
||||
- // set name
|
||||
- spstr strCommand.txt,tEntity1.txt,"~",8
|
||||
- vis tEntity1,1
|
||||
- }
|
||||
- if(type1.txt=="light")
|
||||
- {
|
||||
- vis btOnOff1,1
|
||||
- vis bText1,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tTmp.txt,"~",9
|
||||
- covx tTmp.txt,sys0,0,0
|
||||
- btOnOff1.val=sys0
|
||||
- }
|
||||
- if(type1.txt=="switch")
|
||||
- {
|
||||
- vis btOnOff1,1
|
||||
- vis bText1,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tTmp.txt,"~",9
|
||||
- covx tTmp.txt,sys0,0,0
|
||||
- btOnOff1.val=sys0
|
||||
- }
|
||||
- if(type1.txt=="text")
|
||||
- {
|
||||
- vis btOnOff1,0
|
||||
- vis bText1,1
|
||||
- tsw bText1,0
|
||||
- bText1.pco=65535
|
||||
- bText1.pco2=65535
|
||||
- // get Text (optional Value)
|
||||
- spstr strCommand.txt,bText1.txt,"~",9
|
||||
- }
|
||||
- if(type1.txt=="button")
|
||||
- {
|
||||
- vis btOnOff1,0
|
||||
- vis bText1,1
|
||||
- tsw bText1,1
|
||||
- bText1.pco=1374
|
||||
- bText1.pco2=1374
|
||||
- // get Text (optional Value)
|
||||
- spstr strCommand.txt,bText1.txt,"~",9
|
||||
- }
|
||||
- // get Type
|
||||
- spstr strCommand.txt,type2.txt,"~",10
|
||||
- // get internal name
|
||||
- spstr strCommand.txt,entn2.txt,"~",11
|
||||
- if(type2.txt=="delete"||type2.txt=="")
|
||||
- {
|
||||
- vis btOnOff2,0
|
||||
- vis tEntity2,0
|
||||
- vis tIcon2,0
|
||||
- vis bText2,0
|
||||
- }else
|
||||
- {
|
||||
- // change icon
|
||||
- spstr strCommand.txt,tIcon2.txt,"~",12
|
||||
- vis tIcon2,1
|
||||
- // change icon color
|
||||
- spstr strCommand.txt,tTmp.txt,"~",13
|
||||
- covx tTmp.txt,sys0,0,0
|
||||
- tIcon2.pco=sys0
|
||||
- // set name
|
||||
- spstr strCommand.txt,tEntity2.txt,"~",14
|
||||
- vis tEntity2,1
|
||||
- }
|
||||
- if(type2.txt=="light")
|
||||
- {
|
||||
- vis btOnOff2,1
|
||||
- vis bText2,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tTmp.txt,"~",15
|
||||
- covx tTmp.txt,sys0,0,0
|
||||
- btOnOff2.val=sys0
|
||||
- }
|
||||
- if(type2.txt=="switch")
|
||||
- {
|
||||
- vis btOnOff2,1
|
||||
- vis bText2,0
|
||||
- // get Button State (optional Value)
|
||||
- spstr strCommand.txt,tTmp.txt,"~",15
|
||||
- covx tTmp.txt,sys0,0,0
|
||||
- btOnOff2.val=sys0
|
||||
- }
|
||||
- if(type2.txt=="text")
|
||||
- {
|
||||
- vis btOnOff2,0
|
||||
- vis bText2,1
|
||||
- tsw bText2,0
|
||||
- bText2.pco=65535
|
||||
- bText2.pco2=65535
|
||||
- // get Text (optional Value)
|
||||
- spstr strCommand.txt,bText2.txt,"~",15
|
||||
- }
|
||||
- if(type2.txt=="button")
|
||||
- {
|
||||
- vis btOnOff2,0
|
||||
- vis bText2,1
|
||||
- tsw bText2,1
|
||||
- bText2.pco=1374
|
||||
- bText2.pco2=1374
|
||||
- // get Text (optional Value)
|
||||
- spstr strCommand.txt,bText2.txt,"~",15
|
||||
- }
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
@@ -686,10 +541,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
diff -bur HMI/n2t-out/cardThermo.txt HMI/US/portrait/n2t-out/cardThermo.txt
|
||||
--- HMI/n2t-out/cardThermo.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardThermo.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -1192,10 +1192,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
|
||||
--- HMI/n2t-out/pageStartup.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
--- 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
|
||||
@@ -142,7 +142,7 @@
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
@@ -830,15 +481,6 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
|
||||
Max. Text Size : 100
|
||||
|
||||
Text tVersion
|
||||
@@ -152,7 +152,7 @@
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
- Text : 35
|
||||
+ Text : 34
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture p0
|
||||
@@ -177,7 +177,7 @@
|
||||
recmod=1
|
||||
bauds=115200
|
||||
@@ -860,37 +502,285 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
|
||||
// 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:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-21 14:30:06.901411132 +0000
|
||||
@@ -618,10 +618,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
diff -bur HMI/n2t-out/popupNotify.txt HMI/US/portrait/n2t-out/popupNotify.txt
|
||||
--- HMI/n2t-out/popupNotify.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/popupNotify.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -381,10 +381,6 @@
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
- if(tId.txt=="cardQR")
|
||||
- {
|
||||
- page cardQR
|
||||
- }
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt
|
||||
--- HMI/n2t-out/popupShutter.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/popupShutter.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
@@ -422,10 +422,6 @@
|
||||
--- 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<usize)
|
||||
+ {
|
||||
+ // check for 0x55 0xBB - Command Init Secuence
|
||||
+ if(u[bufferPos]==187&&u[bufferPos-1]==85)
|
||||
+ {
|
||||
+ //remove garbage at the start of the buffer if there's any to free buffer for command
|
||||
+ if(u[bufferPos]!=1)
|
||||
+ {
|
||||
+ udelete bufferPos-1
|
||||
+ }
|
||||
+ //instruction is now aligned with buffer, because we deleted garbage before instrcution
|
||||
+ //get length after init sequence (check if there are more than to bytes in buffer)
|
||||
+ if(3<usize)
|
||||
+ {
|
||||
+ // check if serial buffer has reached the announced length
|
||||
+ ucopy payloadLength,2,2,0
|
||||
+ // we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
|
||||
+ payloadLength+=3
|
||||
+ // payload length does also not contain crc, so we are adding another 2 bytes for crc
|
||||
+ payloadLength+=2
|
||||
+ if(payloadLength<usize)
|
||||
+ {
|
||||
+ // calculate crc
|
||||
+ crcrest 1,0xFFFF
|
||||
+ // u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
|
||||
+ //crcputu 3,u[2]
|
||||
+ // u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
|
||||
+ crcputu 0,payloadLength-1
|
||||
+ // get recived crc to be able to compare it
|
||||
+ ucopy recvCrc,payloadLength-1,2,0
|
||||
+ // compare crc with recived value
|
||||
+ if(crcval==recvCrc)
|
||||
+ {
|
||||
+ // crc is okay
|
||||
+ // here is the location where acual code should be
|
||||
+ // write command to variable strCommand
|
||||
+ ucopy strCommand.txt,4,payloadLength-5,0
|
||||
+ // write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
+ spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
+ if(tInstruction.txt=="entityUpdateDetail")
|
||||
+ {
|
||||
+ // change icon
|
||||
+ spstr strCommand.txt,tIcon1.txt,"~",1
|
||||
+ vis tIcon1,1
|
||||
+ // change icon color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",2
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ tIcon1.pco=sys0
|
||||
+ // get Button State
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",3
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff1.val=sys0
|
||||
+ // get Brightness value
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",4
|
||||
+ if(tTmp.txt=="disable")
|
||||
+ {
|
||||
vis t1,0
|
||||
vis t2,0
|
||||
vis hBrightness,0
|
||||
- //disable color temp by default
|
||||
- vis t4,0
|
||||
- vis t3,0
|
||||
+ }else
|
||||
+ {
|
||||
+ vis t1,1
|
||||
+ vis t2,1
|
||||
+ vis hBrightness,1
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ if(tmCooldown.en==0)
|
||||
+ {
|
||||
+ hBrightness.val=sys0
|
||||
+ }
|
||||
+ }
|
||||
+ // get ColorTemp value
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",5
|
||||
+ if(tTmp.txt=="disable")
|
||||
+ {
|
||||
vis hTempSlider,0
|
||||
- //disable color wheel components by default
|
||||
- vis bColor,0
|
||||
+ vis t3,0
|
||||
+ vis t4,0
|
||||
+ mode_temp.val=0
|
||||
+ // mode == 1 is temp controls currently shown
|
||||
+ if(mode.val==1)
|
||||
+ {
|
||||
+ // switch mode
|
||||
+ click bColor,1
|
||||
+ click bColor,0
|
||||
+ }
|
||||
+ }else if(tTmp.txt=="unknown") // temp supported, but not in color mode
|
||||
+ {
|
||||
+ mode_temp.val=1
|
||||
+ // mode == 1 is temp controls currently shown
|
||||
+ if(mode.val==1)
|
||||
+ {
|
||||
+ // switch mode
|
||||
+ click bColor,1
|
||||
+ click bColor,0
|
||||
+ }
|
||||
+ }else
|
||||
+ {
|
||||
+ mode_temp.val=1
|
||||
+ vis hTempSlider,1
|
||||
+ vis t3,1
|
||||
+ vis t4,1
|
||||
+ if(tmCooldown.en==0)
|
||||
+ {
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hTempSlider.val=sys0
|
||||
+ }
|
||||
+ // mode == 0 is rgb controls currently shown
|
||||
+ if(mode.val==0)
|
||||
+ {
|
||||
+ // switch mode
|
||||
+ click bColor,1
|
||||
+ click bColor,0
|
||||
+ }
|
||||
+ }
|
||||
+ // get Color value
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",6
|
||||
+ // disable -> 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
|
||||
}
|
||||
@@ -902,8 +792,8 @@ diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt
|
||||
// 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:30:06.481412328 +0000
|
||||
+++ HMI/US/portrait/n2t-out/screensaver.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
--- 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
|
||||
|
||||
@@ -1,220 +1,37 @@
|
||||
+++ HMI/US/portrait/diff-eu-version.txt 2022-05-21 14:30:06.913411098 +0000
|
||||
+--- HMI/n2t-out/Program.s.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+diff -bur HMI/n2t-out/cardAlarm.txt HMI/US/portrait/n2t-out/cardAlarm.txt
|
||||
+--- HMI/n2t-out/cardAlarm.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardAlarm.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -788,10 +788,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ // end of user code
|
||||
+ udelete payloadLength-1
|
||||
+--- HMI/n2t-out/cardEntities.txt 2022-05-21 14:30:06.485412317 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-05-21 14:30:06.901411132 +0000
|
||||
+++ 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
|
||||
+ Hotspot mSwipeNext
|
||||
+ Scope : local
|
||||
+@@ -1277,28 +1505,6 @@
|
||||
+ vis bText1,0
|
||||
+ vis hSlider1,0
|
||||
+ vis nNum1,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tId.txt,"~",8
|
||||
+- spstr tId.txt,tTmp.txt,"|",0
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bUp1.pco=27501
|
||||
+- tsw bUp1,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bUp1.pco=65535
|
||||
+- tsw bUp1,1
|
||||
+- }
|
||||
+- spstr tId.txt,tTmp.txt,"|",1
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bDown1.pco=27501
|
||||
+- tsw bDown1,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bDown1.pco=65535
|
||||
+- tsw bDown1,1
|
||||
+- }
|
||||
+ }
|
||||
+ if(type1.txt=="light")
|
||||
+ {
|
||||
+@@ -1421,28 +1627,6 @@
|
||||
+ vis bText2,0
|
||||
+ vis hSlider2,0
|
||||
+ vis nNum2,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tId.txt,"~",14
|
||||
+- spstr tId.txt,tTmp.txt,"|",0
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bUp2.pco=27501
|
||||
+- tsw bUp2,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bUp2.pco=65535
|
||||
+- tsw bUp2,1
|
||||
+- }
|
||||
+- spstr tId.txt,tTmp.txt,"|",1
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bDown2.pco=27501
|
||||
+- tsw bDown2,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bDown2.pco=65535
|
||||
+- tsw bDown2,1
|
||||
+- }
|
||||
+ }
|
||||
+ if(type2.txt=="light")
|
||||
+ {
|
||||
+@@ -1565,28 +1749,6 @@
|
||||
+ vis bText3,0
|
||||
+ vis hSlider3,0
|
||||
+ vis nNum3,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tId.txt,"~",20
|
||||
+- spstr tId.txt,tTmp.txt,"|",0
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bUp3.pco=27501
|
||||
+- tsw bUp3,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bUp3.pco=65535
|
||||
+- tsw bUp3,1
|
||||
+- }
|
||||
+- spstr tId.txt,tTmp.txt,"|",1
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bDown3.pco=27501
|
||||
+- tsw bDown3,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bDown3.pco=65535
|
||||
+- tsw bDown3,1
|
||||
+- }
|
||||
+ }
|
||||
+ if(type3.txt=="light")
|
||||
+ {
|
||||
+@@ -1709,28 +1871,6 @@
|
||||
+ vis bText4,0
|
||||
+ vis hSlider4,0
|
||||
+ vis nNum4,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tId.txt,"~",26
|
||||
+- spstr tId.txt,tTmp.txt,"|",0
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bUp4.pco=27501
|
||||
+- tsw bUp4,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bUp4.pco=65535
|
||||
+- tsw bUp4,1
|
||||
+- }
|
||||
+- spstr tId.txt,tTmp.txt,"|",1
|
||||
+- if(tTmp.txt=="0")
|
||||
+- {
|
||||
+- bDown4.pco=27501
|
||||
+- tsw bDown4,0
|
||||
+- }else
|
||||
+- {
|
||||
+- bDown4.pco=65535
|
||||
+- tsw bDown4,1
|
||||
+- }
|
||||
+ }
|
||||
+ if(type4.txt=="light")
|
||||
+ {
|
||||
+@@ -1816,6 +1956,128 @@
|
||||
+@@ -1871,10 +2133,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="time")
|
||||
+ {
|
||||
+diff -bur HMI/n2t-out/cardGrid.txt HMI/US/portrait/n2t-out/cardGrid.txt
|
||||
+--- HMI/n2t-out/cardGrid.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardGrid.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -869,10 +869,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="time")
|
||||
+ {
|
||||
+diff -bur HMI/n2t-out/cardMedia.txt HMI/US/portrait/n2t-out/cardMedia.txt
|
||||
+--- HMI/n2t-out/cardMedia.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardMedia.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -740,10 +740,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ // end of user code
|
||||
+ udelete payloadLength-1
|
||||
+@@ -1816,6 +2044,150 @@
|
||||
++ // get Button State (optional Value)
|
||||
++ spstr strCommand.txt,tId.txt,"~",32
|
||||
++ spstr tId.txt,tTmp.txt,"|",0
|
||||
++ if(tTmp.txt=="0")
|
||||
++ {
|
||||
++ bUp5.pco=27501
|
||||
++ tsw bUp5,0
|
||||
++ }else
|
||||
++ {
|
||||
++ bUp5.pco=65535
|
||||
++ tsw bUp5,1
|
||||
++ }
|
||||
++ spstr tId.txt,tTmp.txt,"|",1
|
||||
++ if(tTmp.txt=="0")
|
||||
++ {
|
||||
++ bDown5.pco=27501
|
||||
++ tsw bDown5,0
|
||||
++ }else
|
||||
++ {
|
||||
++ bDown5.pco=65535
|
||||
++ 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:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardQR.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -19,16 +19,6 @@
|
||||
+ vis tId,0
|
||||
+ vis bPrev,0
|
||||
+ vis bNext,0
|
||||
+- //ui e1
|
||||
+- vis btOnOff1,0
|
||||
+- vis tIcon1,0
|
||||
+- vis tEntity1,0
|
||||
+- vis bText1,0
|
||||
+- //ui e2
|
||||
+- vis btOnOff2,0
|
||||
+- vis tIcon2,0
|
||||
+- vis tEntity2,0
|
||||
+- vis bText2,0
|
||||
+
|
||||
+ Variable (string) strCommand
|
||||
+ Attributes
|
||||
+@@ -78,18 +68,6 @@
|
||||
+ Text :
|
||||
+ Max. Text Size: 80
|
||||
+
|
||||
+-Variable (string) type1
|
||||
+- Attributes
|
||||
+- Scope : local
|
||||
+- Text :
|
||||
+- Max. Text Size: 10
|
||||
+-
|
||||
+-Variable (string) type2
|
||||
+- Attributes
|
||||
+- Scope : local
|
||||
+- Text :
|
||||
+- Max. Text Size: 10
|
||||
+-
|
||||
+ Text tEntity1
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+@@ -137,7 +115,7 @@
|
||||
+--- 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
|
||||
+@@ -137,7 +137,7 @@
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
@@ -223,7 +40,7 @@
|
||||
+ Max. Text Size : 40
|
||||
+
|
||||
+ Picture p0
|
||||
+@@ -153,7 +131,7 @@
|
||||
+@@ -153,7 +153,7 @@
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
@@ -232,183 +49,8 @@
|
||||
+ Max. Text Size : 105
|
||||
+
|
||||
+ Button bNext
|
||||
+@@ -454,9 +432,8 @@
|
||||
+ spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
+ if(tInstruction.txt=="entityUpd")
|
||||
+ {
|
||||
+- // command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
|
||||
+- //tHeading
|
||||
+- spstr strCommand.txt,tHeading.txt,"~",1
|
||||
++ //entn
|
||||
++ spstr strCommand.txt,entn.txt,"~",1
|
||||
+ // navigation icons
|
||||
+ spstr strCommand.txt,tId.txt,"~",2
|
||||
+ spstr tId.txt,tTmp.txt,"|",0
|
||||
+@@ -486,128 +463,6 @@
|
||||
+ }
|
||||
+ //text qrcode
|
||||
+ spstr strCommand.txt,qr0.txt,"~",3
|
||||
+- // get Type
|
||||
+- spstr strCommand.txt,type1.txt,"~",4
|
||||
+- // get internal name
|
||||
+- spstr strCommand.txt,entn1.txt,"~",5
|
||||
+- if(type1.txt=="delete"||type1.txt=="")
|
||||
+- {
|
||||
+- vis btOnOff1,0
|
||||
+- vis tEntity1,0
|
||||
+- vis tIcon1,0
|
||||
+- vis bText1,0
|
||||
+- }else
|
||||
+- {
|
||||
+- // change icon
|
||||
+- spstr strCommand.txt,tIcon1.txt,"~",6
|
||||
+- vis tIcon1,1
|
||||
+- // change icon color
|
||||
+- spstr strCommand.txt,tTmp.txt,"~",7
|
||||
+- covx tTmp.txt,sys0,0,0
|
||||
+- tIcon1.pco=sys0
|
||||
+- // set name
|
||||
+- spstr strCommand.txt,tEntity1.txt,"~",8
|
||||
+- vis tEntity1,1
|
||||
+- }
|
||||
+- if(type1.txt=="light")
|
||||
+- {
|
||||
+- vis btOnOff1,1
|
||||
+- vis bText1,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tTmp.txt,"~",9
|
||||
+- covx tTmp.txt,sys0,0,0
|
||||
+- btOnOff1.val=sys0
|
||||
+- }
|
||||
+- if(type1.txt=="switch")
|
||||
+- {
|
||||
+- vis btOnOff1,1
|
||||
+- vis bText1,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tTmp.txt,"~",9
|
||||
+- covx tTmp.txt,sys0,0,0
|
||||
+- btOnOff1.val=sys0
|
||||
+- }
|
||||
+- if(type1.txt=="text")
|
||||
+- {
|
||||
+- vis btOnOff1,0
|
||||
+- vis bText1,1
|
||||
+- tsw bText1,0
|
||||
+- bText1.pco=65535
|
||||
+- bText1.pco2=65535
|
||||
+- // get Text (optional Value)
|
||||
+- spstr strCommand.txt,bText1.txt,"~",9
|
||||
+- }
|
||||
+- if(type1.txt=="button")
|
||||
+- {
|
||||
+- vis btOnOff1,0
|
||||
+- vis bText1,1
|
||||
+- tsw bText1,1
|
||||
+- bText1.pco=1374
|
||||
+- bText1.pco2=1374
|
||||
+- // get Text (optional Value)
|
||||
+- spstr strCommand.txt,bText1.txt,"~",9
|
||||
+- }
|
||||
+- // get Type
|
||||
+- spstr strCommand.txt,type2.txt,"~",10
|
||||
+- // get internal name
|
||||
+- spstr strCommand.txt,entn2.txt,"~",11
|
||||
+- if(type2.txt=="delete"||type2.txt=="")
|
||||
+- {
|
||||
+- vis btOnOff2,0
|
||||
+- vis tEntity2,0
|
||||
+- vis tIcon2,0
|
||||
+- vis bText2,0
|
||||
+- }else
|
||||
+- {
|
||||
+- // change icon
|
||||
+- spstr strCommand.txt,tIcon2.txt,"~",12
|
||||
+- vis tIcon2,1
|
||||
+- // change icon color
|
||||
+- spstr strCommand.txt,tTmp.txt,"~",13
|
||||
+- covx tTmp.txt,sys0,0,0
|
||||
+- tIcon2.pco=sys0
|
||||
+- // set name
|
||||
+- spstr strCommand.txt,tEntity2.txt,"~",14
|
||||
+- vis tEntity2,1
|
||||
+- }
|
||||
+- if(type2.txt=="light")
|
||||
+- {
|
||||
+- vis btOnOff2,1
|
||||
+- vis bText2,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tTmp.txt,"~",15
|
||||
+- covx tTmp.txt,sys0,0,0
|
||||
+- btOnOff2.val=sys0
|
||||
+- }
|
||||
+- if(type2.txt=="switch")
|
||||
+- {
|
||||
+- vis btOnOff2,1
|
||||
+- vis bText2,0
|
||||
+- // get Button State (optional Value)
|
||||
+- spstr strCommand.txt,tTmp.txt,"~",15
|
||||
+- covx tTmp.txt,sys0,0,0
|
||||
+- btOnOff2.val=sys0
|
||||
+- }
|
||||
+- if(type2.txt=="text")
|
||||
+- {
|
||||
+- vis btOnOff2,0
|
||||
+- vis bText2,1
|
||||
+- tsw bText2,0
|
||||
+- bText2.pco=65535
|
||||
+- bText2.pco2=65535
|
||||
+- // get Text (optional Value)
|
||||
+- spstr strCommand.txt,bText2.txt,"~",15
|
||||
+- }
|
||||
+- if(type2.txt=="button")
|
||||
+- {
|
||||
+- vis btOnOff2,0
|
||||
+- vis bText2,1
|
||||
+- tsw bText2,1
|
||||
+- bText2.pco=1374
|
||||
+- bText2.pco2=1374
|
||||
+- // get Text (optional Value)
|
||||
+- spstr strCommand.txt,bText2.txt,"~",15
|
||||
+- }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="time")
|
||||
+ {
|
||||
+@@ -686,10 +541,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ // end of user code
|
||||
+ udelete payloadLength-1
|
||||
+diff -bur HMI/n2t-out/cardThermo.txt HMI/US/portrait/n2t-out/cardThermo.txt
|
||||
+--- HMI/n2t-out/cardThermo.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardThermo.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -1192,10 +1192,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="time")
|
||||
+ {
|
||||
+--- HMI/n2t-out/pageStartup.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -152,7 +152,7 @@
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+- Text : 35
|
||||
++ Text : 34
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Picture p0
|
||||
+--- 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
|
||||
@@ -421,37 +63,285 @@
|
||||
+ // 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:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/popupLight.txt 2022-05-21 14:30:06.901411132 +0000
|
||||
+@@ -618,10 +618,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ // end of user code
|
||||
+ udelete payloadLength-1
|
||||
+diff -bur HMI/n2t-out/popupNotify.txt HMI/US/portrait/n2t-out/popupNotify.txt
|
||||
+--- HMI/n2t-out/popupNotify.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/popupNotify.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -381,10 +381,6 @@
|
||||
+ {
|
||||
+ page cardAlarm
|
||||
+ }
|
||||
+- if(tId.txt=="cardQR")
|
||||
+- {
|
||||
+- page cardQR
|
||||
+- }
|
||||
+ }
|
||||
+ // end of user code
|
||||
+ udelete payloadLength-1
|
||||
+diff -bur HMI/n2t-out/popupShutter.txt HMI/US/portrait/n2t-out/popupShutter.txt
|
||||
+--- HMI/n2t-out/popupShutter.txt 2022-05-21 14:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/popupShutter.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+@@ -422,10 +422,6 @@
|
||||
+--- 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<usize)
|
||||
++ {
|
||||
++ // check for 0x55 0xBB - Command Init Secuence
|
||||
++ if(u[bufferPos]==187&&u[bufferPos-1]==85)
|
||||
++ {
|
||||
++ //remove garbage at the start of the buffer if there's any to free buffer for command
|
||||
++ if(u[bufferPos]!=1)
|
||||
++ {
|
||||
++ udelete bufferPos-1
|
||||
++ }
|
||||
++ //instruction is now aligned with buffer, because we deleted garbage before instrcution
|
||||
++ //get length after init sequence (check if there are more than to bytes in buffer)
|
||||
++ if(3<usize)
|
||||
++ {
|
||||
++ // check if serial buffer has reached the announced length
|
||||
++ ucopy payloadLength,2,2,0
|
||||
++ // we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
|
||||
++ payloadLength+=3
|
||||
++ // payload length does also not contain crc, so we are adding another 2 bytes for crc
|
||||
++ payloadLength+=2
|
||||
++ if(payloadLength<usize)
|
||||
++ {
|
||||
++ // calculate crc
|
||||
++ crcrest 1,0xFFFF
|
||||
++ // u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
|
||||
++ //crcputu 3,u[2]
|
||||
++ // u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
|
||||
++ crcputu 0,payloadLength-1
|
||||
++ // get recived crc to be able to compare it
|
||||
++ ucopy recvCrc,payloadLength-1,2,0
|
||||
++ // compare crc with recived value
|
||||
++ if(crcval==recvCrc)
|
||||
++ {
|
||||
++ // crc is okay
|
||||
++ // here is the location where acual code should be
|
||||
++ // write command to variable strCommand
|
||||
++ ucopy strCommand.txt,4,payloadLength-5,0
|
||||
++ // write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
++ spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
++ if(tInstruction.txt=="entityUpdateDetail")
|
||||
++ {
|
||||
++ // change icon
|
||||
++ spstr strCommand.txt,tIcon1.txt,"~",1
|
||||
++ vis tIcon1,1
|
||||
++ // change icon color
|
||||
++ spstr strCommand.txt,tTmp.txt,"~",2
|
||||
++ covx tTmp.txt,sys0,0,0
|
||||
++ tIcon1.pco=sys0
|
||||
++ // get Button State
|
||||
++ spstr strCommand.txt,tTmp.txt,"~",3
|
||||
++ covx tTmp.txt,sys0,0,0
|
||||
++ btOnOff1.val=sys0
|
||||
++ // get Brightness value
|
||||
++ spstr strCommand.txt,tTmp.txt,"~",4
|
||||
++ if(tTmp.txt=="disable")
|
||||
++ {
|
||||
+ vis t1,0
|
||||
+ vis t2,0
|
||||
+ vis hBrightness,0
|
||||
+- //disable color temp by default
|
||||
+- vis t4,0
|
||||
+- vis t3,0
|
||||
++ }else
|
||||
++ {
|
||||
++ vis t1,1
|
||||
++ vis t2,1
|
||||
++ vis hBrightness,1
|
||||
++ covx tTmp.txt,sys0,0,0
|
||||
++ if(tmCooldown.en==0)
|
||||
++ {
|
||||
++ hBrightness.val=sys0
|
||||
++ }
|
||||
++ }
|
||||
++ // get ColorTemp value
|
||||
++ spstr strCommand.txt,tTmp.txt,"~",5
|
||||
++ if(tTmp.txt=="disable")
|
||||
++ {
|
||||
+ vis hTempSlider,0
|
||||
+- //disable color wheel components by default
|
||||
+- vis bColor,0
|
||||
++ vis t3,0
|
||||
++ vis t4,0
|
||||
++ mode_temp.val=0
|
||||
++ // mode == 1 is temp controls currently shown
|
||||
++ if(mode.val==1)
|
||||
++ {
|
||||
++ // switch mode
|
||||
++ click bColor,1
|
||||
++ click bColor,0
|
||||
++ }
|
||||
++ }else if(tTmp.txt=="unknown") // temp supported, but not in color mode
|
||||
++ {
|
||||
++ mode_temp.val=1
|
||||
++ // mode == 1 is temp controls currently shown
|
||||
++ if(mode.val==1)
|
||||
++ {
|
||||
++ // switch mode
|
||||
++ click bColor,1
|
||||
++ click bColor,0
|
||||
++ }
|
||||
++ }else
|
||||
++ {
|
||||
++ mode_temp.val=1
|
||||
++ vis hTempSlider,1
|
||||
++ vis t3,1
|
||||
++ vis t4,1
|
||||
++ if(tmCooldown.en==0)
|
||||
++ {
|
||||
++ covx tTmp.txt,sys0,0,0
|
||||
++ hTempSlider.val=sys0
|
||||
++ }
|
||||
++ // mode == 0 is rgb controls currently shown
|
||||
++ if(mode.val==0)
|
||||
++ {
|
||||
++ // switch mode
|
||||
++ click bColor,1
|
||||
++ click bColor,0
|
||||
++ }
|
||||
++ }
|
||||
++ // get Color value
|
||||
++ spstr strCommand.txt,tTmp.txt,"~",6
|
||||
++ // disable -> 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
|
||||
+ }
|
||||
@@ -463,8 +353,8 @@
|
||||
+ // 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:30:06.481412328 +0000
|
||||
++++ HMI/US/portrait/n2t-out/screensaver.txt 2022-05-21 14:30:06.897411144 +0000
|
||||
+--- 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
|
||||
|
||||
@@ -1345,6 +1345,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -2670,6 +2670,28 @@ Timer tmSerial
|
||||
vis bText1,0
|
||||
vis hSlider1,0
|
||||
vis nNum1,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",8
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp1.pco=27501
|
||||
tsw bUp1,0
|
||||
}else
|
||||
{
|
||||
bUp1.pco=65535
|
||||
tsw bUp1,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown1.pco=27501
|
||||
tsw bDown1,0
|
||||
}else
|
||||
{
|
||||
bDown1.pco=65535
|
||||
tsw bDown1,1
|
||||
}
|
||||
}
|
||||
if(type1.txt=="light")
|
||||
{
|
||||
@@ -2792,6 +2814,28 @@ Timer tmSerial
|
||||
vis bText2,0
|
||||
vis hSlider2,0
|
||||
vis nNum2,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",14
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp2.pco=27501
|
||||
tsw bUp2,0
|
||||
}else
|
||||
{
|
||||
bUp2.pco=65535
|
||||
tsw bUp2,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown2.pco=27501
|
||||
tsw bDown2,0
|
||||
}else
|
||||
{
|
||||
bDown2.pco=65535
|
||||
tsw bDown2,1
|
||||
}
|
||||
}
|
||||
if(type2.txt=="light")
|
||||
{
|
||||
@@ -2914,6 +2958,28 @@ Timer tmSerial
|
||||
vis bText3,0
|
||||
vis hSlider3,0
|
||||
vis nNum3,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",20
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp3.pco=27501
|
||||
tsw bUp3,0
|
||||
}else
|
||||
{
|
||||
bUp3.pco=65535
|
||||
tsw bUp3,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown3.pco=27501
|
||||
tsw bDown3,0
|
||||
}else
|
||||
{
|
||||
bDown3.pco=65535
|
||||
tsw bDown3,1
|
||||
}
|
||||
}
|
||||
if(type3.txt=="light")
|
||||
{
|
||||
@@ -3036,6 +3102,28 @@ Timer tmSerial
|
||||
vis bText4,0
|
||||
vis hSlider4,0
|
||||
vis nNum4,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",26
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp4.pco=27501
|
||||
tsw bUp4,0
|
||||
}else
|
||||
{
|
||||
bUp4.pco=65535
|
||||
tsw bUp4,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown4.pco=27501
|
||||
tsw bDown4,0
|
||||
}else
|
||||
{
|
||||
bDown4.pco=65535
|
||||
tsw bDown4,1
|
||||
}
|
||||
}
|
||||
if(type4.txt=="light")
|
||||
{
|
||||
@@ -3158,6 +3246,28 @@ Timer tmSerial
|
||||
vis bText5,0
|
||||
vis hSlider5,0
|
||||
vis nNum5,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",32
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp5.pco=27501
|
||||
tsw bUp5,0
|
||||
}else
|
||||
{
|
||||
bUp5.pco=65535
|
||||
tsw bUp5,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown5.pco=27501
|
||||
tsw bDown5,0
|
||||
}else
|
||||
{
|
||||
bDown5.pco=65535
|
||||
tsw bDown5,1
|
||||
}
|
||||
}
|
||||
if(type5.txt=="light")
|
||||
{
|
||||
@@ -3298,6 +3408,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
@@ -1333,6 +1333,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
@@ -1189,6 +1189,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -27,6 +27,16 @@ Page cardQR
|
||||
vis tId,0
|
||||
vis bPrev,0
|
||||
vis bNext,0
|
||||
//ui e1
|
||||
vis btOnOff1,0
|
||||
vis tIcon1,0
|
||||
vis tEntity1,0
|
||||
vis bText1,0
|
||||
//ui e2
|
||||
vis btOnOff2,0
|
||||
vis tIcon2,0
|
||||
vis tEntity2,0
|
||||
vis bText2,0
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
@@ -84,6 +94,20 @@ Variable (string) entn2
|
||||
Text :
|
||||
Max. Text Size: 80
|
||||
|
||||
Variable (string) type1
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) type2
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text tEntity1
|
||||
Attributes
|
||||
ID : 15
|
||||
@@ -720,8 +744,9 @@ Timer tmSerial
|
||||
spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
if(tInstruction.txt=="entityUpd")
|
||||
{
|
||||
//entn
|
||||
spstr strCommand.txt,entn.txt,"~",1
|
||||
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
|
||||
//tHeading
|
||||
spstr strCommand.txt,tHeading.txt,"~",1
|
||||
// navigation icons
|
||||
spstr strCommand.txt,tId.txt,"~",2
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
@@ -751,6 +776,128 @@ Timer tmSerial
|
||||
}
|
||||
//text qrcode
|
||||
spstr strCommand.txt,qr0.txt,"~",3
|
||||
// get Type
|
||||
spstr strCommand.txt,type1.txt,"~",4
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn1.txt,"~",5
|
||||
if(type1.txt=="delete"||type1.txt=="")
|
||||
{
|
||||
vis btOnOff1,0
|
||||
vis tEntity1,0
|
||||
vis tIcon1,0
|
||||
vis bText1,0
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon1.txt,"~",6
|
||||
vis tIcon1,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon1.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity1.txt,"~",8
|
||||
vis tEntity1,1
|
||||
}
|
||||
if(type1.txt=="light")
|
||||
{
|
||||
vis btOnOff1,1
|
||||
vis bText1,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff1.val=sys0
|
||||
}
|
||||
if(type1.txt=="switch")
|
||||
{
|
||||
vis btOnOff1,1
|
||||
vis bText1,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff1.val=sys0
|
||||
}
|
||||
if(type1.txt=="text")
|
||||
{
|
||||
vis btOnOff1,0
|
||||
vis bText1,1
|
||||
tsw bText1,0
|
||||
bText1.pco=65535
|
||||
bText1.pco2=65535
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText1.txt,"~",9
|
||||
}
|
||||
if(type1.txt=="button")
|
||||
{
|
||||
vis btOnOff1,0
|
||||
vis bText1,1
|
||||
tsw bText1,1
|
||||
bText1.pco=1374
|
||||
bText1.pco2=1374
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText1.txt,"~",9
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type2.txt,"~",10
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn2.txt,"~",11
|
||||
if(type2.txt=="delete"||type2.txt=="")
|
||||
{
|
||||
vis btOnOff2,0
|
||||
vis tEntity2,0
|
||||
vis tIcon2,0
|
||||
vis bText2,0
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon2.txt,"~",12
|
||||
vis tIcon2,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon2.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity2.txt,"~",14
|
||||
vis tEntity2,1
|
||||
}
|
||||
if(type2.txt=="light")
|
||||
{
|
||||
vis btOnOff2,1
|
||||
vis bText2,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff2.val=sys0
|
||||
}
|
||||
if(type2.txt=="switch")
|
||||
{
|
||||
vis btOnOff2,1
|
||||
vis bText2,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff2.val=sys0
|
||||
}
|
||||
if(type2.txt=="text")
|
||||
{
|
||||
vis btOnOff2,0
|
||||
vis bText2,1
|
||||
tsw bText2,0
|
||||
bText2.pco=65535
|
||||
bText2.pco2=65535
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText2.txt,"~",15
|
||||
}
|
||||
if(type2.txt=="button")
|
||||
{
|
||||
vis btOnOff2,0
|
||||
vis bText2,1
|
||||
tsw bText2,1
|
||||
bText2.pco=1374
|
||||
bText2.pco2=1374
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText2.txt,"~",15
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
@@ -829,6 +976,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -1973,6 +1973,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
@@ -10,53 +10,53 @@ pageTest
|
||||
14 Component(s)
|
||||
14 Line(s) of event code
|
||||
14 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
200 Line(s) of event code
|
||||
125 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
|
||||
popupShutter
|
||||
20 Component(s)
|
||||
193 Line(s) of event code
|
||||
109 Unique line(s) of event code
|
||||
cardMedia
|
||||
33 Component(s)
|
||||
346 Line(s) of event code
|
||||
177 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
196 Line(s) of event code
|
||||
123 Unique line(s) of event code
|
||||
screensaver
|
||||
35 Component(s)
|
||||
292 Line(s) of event code
|
||||
235 Unique line(s) of event code
|
||||
cardQR
|
||||
28 Component(s)
|
||||
247 Line(s) of event code
|
||||
137 Unique line(s) of event code
|
||||
cardAlarm
|
||||
38 Component(s)
|
||||
360 Line(s) of event code
|
||||
222 Unique line(s) of event code
|
||||
cardGrid
|
||||
42 Component(s)
|
||||
435 Line(s) of event code
|
||||
252 Unique line(s) of event code
|
||||
cardThermo
|
||||
56 Component(s)
|
||||
542 Line(s) of event code
|
||||
288 Unique line(s) of event code
|
||||
popupLight
|
||||
27 Component(s)
|
||||
341 Line(s) of event code
|
||||
185 Unique line(s) of event code
|
||||
546 Line(s) of event code
|
||||
290 Unique line(s) of event code
|
||||
cardAlarm
|
||||
38 Component(s)
|
||||
364 Line(s) of event code
|
||||
224 Unique line(s) of event code
|
||||
cardMedia
|
||||
33 Component(s)
|
||||
350 Line(s) of event code
|
||||
179 Unique line(s) of event code
|
||||
cardGrid
|
||||
42 Component(s)
|
||||
439 Line(s) of event code
|
||||
254 Unique line(s) of event code
|
||||
cardQR
|
||||
30 Component(s)
|
||||
363 Line(s) of event code
|
||||
205 Unique line(s) of event code
|
||||
cardEntities
|
||||
77 Component(s)
|
||||
1174 Line(s) of event code
|
||||
487 Unique line(s) of event code
|
||||
1283 Line(s) of event code
|
||||
540 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
13 Page(s)
|
||||
412 Component(s)
|
||||
4300 Line(s) of event code
|
||||
1118 Unique line(s) of event code
|
||||
414 Component(s)
|
||||
4715 Line(s) of event code
|
||||
1172 Unique line(s) of event code
|
||||
|
||||
@@ -402,7 +402,7 @@ Text tVersion
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text : 34
|
||||
Text : 35
|
||||
Max. Text Size : 10
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
|
||||
@@ -20,43 +20,244 @@ Page popupLight
|
||||
|
||||
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
|
||||
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
|
||||
// data available
|
||||
if(usize>1)
|
||||
{
|
||||
bufferPos=0
|
||||
while(bufferPos<usize)
|
||||
{
|
||||
// check for 0x55 0xBB - Command Init Secuence
|
||||
if(u[bufferPos]==187&&u[bufferPos-1]==85)
|
||||
{
|
||||
//remove garbage at the start of the buffer if there's any to free buffer for command
|
||||
if(u[bufferPos]!=1)
|
||||
{
|
||||
udelete bufferPos-1
|
||||
}
|
||||
//instruction is now aligned with buffer, because we deleted garbage before instrcution
|
||||
//get length after init sequence (check if there are more than to bytes in buffer)
|
||||
if(3<usize)
|
||||
{
|
||||
// check if serial buffer has reached the announced length
|
||||
ucopy payloadLength,2,2,0
|
||||
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
|
||||
payloadLength+=3
|
||||
// payload length does also not contain crc, so we are adding another 2 bytes for crc
|
||||
payloadLength+=2
|
||||
if(payloadLength<usize)
|
||||
{
|
||||
// calculate crc
|
||||
crcrest 1,0xFFFF
|
||||
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
|
||||
//crcputu 3,u[2]
|
||||
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
|
||||
crcputu 0,payloadLength-1
|
||||
// get recived crc to be able to compare it
|
||||
ucopy recvCrc,payloadLength-1,2,0
|
||||
// compare crc with recived value
|
||||
if(crcval==recvCrc)
|
||||
{
|
||||
// crc is okay
|
||||
// here is the location where acual code should be
|
||||
// write command to variable strCommand
|
||||
ucopy strCommand.txt,4,payloadLength-5,0
|
||||
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
if(tInstruction.txt=="entityUpdateDetail")
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon1.txt,"~",1
|
||||
vis tIcon1,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon1.pco=sys0
|
||||
// get Button State
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff1.val=sys0
|
||||
// get Brightness value
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
if(tTmp.txt=="disable")
|
||||
{
|
||||
vis t1,0
|
||||
vis t2,0
|
||||
vis hBrightness,0
|
||||
}else
|
||||
{
|
||||
vis t1,1
|
||||
vis t2,1
|
||||
vis hBrightness,1
|
||||
covx tTmp.txt,sys0,0,0
|
||||
if(tmCooldown.en==0)
|
||||
{
|
||||
hBrightness.val=sys0
|
||||
}
|
||||
}
|
||||
// get ColorTemp value
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
if(tTmp.txt=="disable")
|
||||
{
|
||||
vis hTempSlider,0
|
||||
vis t3,0
|
||||
vis t4,0
|
||||
mode_temp.val=0
|
||||
// mode == 1 is temp controls currently shown
|
||||
if(mode.val==1)
|
||||
{
|
||||
// switch mode
|
||||
click bColor,1
|
||||
click bColor,0
|
||||
}
|
||||
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
|
||||
{
|
||||
mode_temp.val=1
|
||||
// mode == 1 is temp controls currently shown
|
||||
if(mode.val==1)
|
||||
{
|
||||
// switch mode
|
||||
click bColor,1
|
||||
click bColor,0
|
||||
}
|
||||
}else
|
||||
{
|
||||
mode_temp.val=1
|
||||
vis hTempSlider,1
|
||||
vis t3,1
|
||||
vis t4,1
|
||||
if(tmCooldown.en==0)
|
||||
{
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hTempSlider.val=sys0
|
||||
}
|
||||
// mode == 0 is rgb controls currently shown
|
||||
if(mode.val==0)
|
||||
{
|
||||
// switch mode
|
||||
click bColor,1
|
||||
click bColor,0
|
||||
}
|
||||
}
|
||||
// get Color value
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
// disable -> 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++
|
||||
}
|
||||
}
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
|
||||
@@ -590,6 +590,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -707,6 +707,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -788,6 +788,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -1505,6 +1505,28 @@ Timer tmSerial
|
||||
vis bText1,0
|
||||
vis hSlider1,0
|
||||
vis nNum1,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",8
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp1.pco=27501
|
||||
tsw bUp1,0
|
||||
}else
|
||||
{
|
||||
bUp1.pco=65535
|
||||
tsw bUp1,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown1.pco=27501
|
||||
tsw bDown1,0
|
||||
}else
|
||||
{
|
||||
bDown1.pco=65535
|
||||
tsw bDown1,1
|
||||
}
|
||||
}
|
||||
if(type1.txt=="light")
|
||||
{
|
||||
@@ -1627,6 +1649,28 @@ Timer tmSerial
|
||||
vis bText2,0
|
||||
vis hSlider2,0
|
||||
vis nNum2,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",14
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp2.pco=27501
|
||||
tsw bUp2,0
|
||||
}else
|
||||
{
|
||||
bUp2.pco=65535
|
||||
tsw bUp2,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown2.pco=27501
|
||||
tsw bDown2,0
|
||||
}else
|
||||
{
|
||||
bDown2.pco=65535
|
||||
tsw bDown2,1
|
||||
}
|
||||
}
|
||||
if(type2.txt=="light")
|
||||
{
|
||||
@@ -1749,6 +1793,28 @@ Timer tmSerial
|
||||
vis bText3,0
|
||||
vis hSlider3,0
|
||||
vis nNum3,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",20
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp3.pco=27501
|
||||
tsw bUp3,0
|
||||
}else
|
||||
{
|
||||
bUp3.pco=65535
|
||||
tsw bUp3,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown3.pco=27501
|
||||
tsw bDown3,0
|
||||
}else
|
||||
{
|
||||
bDown3.pco=65535
|
||||
tsw bDown3,1
|
||||
}
|
||||
}
|
||||
if(type3.txt=="light")
|
||||
{
|
||||
@@ -1871,6 +1937,28 @@ Timer tmSerial
|
||||
vis bText4,0
|
||||
vis hSlider4,0
|
||||
vis nNum4,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",26
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp4.pco=27501
|
||||
tsw bUp4,0
|
||||
}else
|
||||
{
|
||||
bUp4.pco=65535
|
||||
tsw bUp4,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown4.pco=27501
|
||||
tsw bDown4,0
|
||||
}else
|
||||
{
|
||||
bDown4.pco=65535
|
||||
tsw bDown4,1
|
||||
}
|
||||
}
|
||||
if(type4.txt=="light")
|
||||
{
|
||||
@@ -1993,6 +2081,28 @@ Timer tmSerial
|
||||
vis bText5,0
|
||||
vis hSlider5,0
|
||||
vis nNum5,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tId.txt,"~",32
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bUp5.pco=27501
|
||||
tsw bUp5,0
|
||||
}else
|
||||
{
|
||||
bUp5.pco=65535
|
||||
tsw bUp5,1
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
{
|
||||
bDown5.pco=27501
|
||||
tsw bDown5,0
|
||||
}else
|
||||
{
|
||||
bDown5.pco=65535
|
||||
tsw bDown5,1
|
||||
}
|
||||
}
|
||||
if(type5.txt=="light")
|
||||
{
|
||||
@@ -2133,6 +2243,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
@@ -869,6 +869,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
@@ -740,6 +740,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -19,6 +19,16 @@ Page cardQR
|
||||
vis tId,0
|
||||
vis bPrev,0
|
||||
vis bNext,0
|
||||
//ui e1
|
||||
vis btOnOff1,0
|
||||
vis tIcon1,0
|
||||
vis tEntity1,0
|
||||
vis bText1,0
|
||||
//ui e2
|
||||
vis btOnOff2,0
|
||||
vis tIcon2,0
|
||||
vis tEntity2,0
|
||||
vis bText2,0
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
@@ -68,6 +78,18 @@ Variable (string) entn2
|
||||
Text :
|
||||
Max. Text Size: 80
|
||||
|
||||
Variable (string) type1
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) type2
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text tEntity1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -432,8 +454,9 @@ Timer tmSerial
|
||||
spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
if(tInstruction.txt=="entityUpd")
|
||||
{
|
||||
//entn
|
||||
spstr strCommand.txt,entn.txt,"~",1
|
||||
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
|
||||
//tHeading
|
||||
spstr strCommand.txt,tHeading.txt,"~",1
|
||||
// navigation icons
|
||||
spstr strCommand.txt,tId.txt,"~",2
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
@@ -463,6 +486,128 @@ Timer tmSerial
|
||||
}
|
||||
//text qrcode
|
||||
spstr strCommand.txt,qr0.txt,"~",3
|
||||
// get Type
|
||||
spstr strCommand.txt,type1.txt,"~",4
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn1.txt,"~",5
|
||||
if(type1.txt=="delete"||type1.txt=="")
|
||||
{
|
||||
vis btOnOff1,0
|
||||
vis tEntity1,0
|
||||
vis tIcon1,0
|
||||
vis bText1,0
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon1.txt,"~",6
|
||||
vis tIcon1,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon1.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity1.txt,"~",8
|
||||
vis tEntity1,1
|
||||
}
|
||||
if(type1.txt=="light")
|
||||
{
|
||||
vis btOnOff1,1
|
||||
vis bText1,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff1.val=sys0
|
||||
}
|
||||
if(type1.txt=="switch")
|
||||
{
|
||||
vis btOnOff1,1
|
||||
vis bText1,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff1.val=sys0
|
||||
}
|
||||
if(type1.txt=="text")
|
||||
{
|
||||
vis btOnOff1,0
|
||||
vis bText1,1
|
||||
tsw bText1,0
|
||||
bText1.pco=65535
|
||||
bText1.pco2=65535
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText1.txt,"~",9
|
||||
}
|
||||
if(type1.txt=="button")
|
||||
{
|
||||
vis btOnOff1,0
|
||||
vis bText1,1
|
||||
tsw bText1,1
|
||||
bText1.pco=1374
|
||||
bText1.pco2=1374
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText1.txt,"~",9
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type2.txt,"~",10
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn2.txt,"~",11
|
||||
if(type2.txt=="delete"||type2.txt=="")
|
||||
{
|
||||
vis btOnOff2,0
|
||||
vis tEntity2,0
|
||||
vis tIcon2,0
|
||||
vis bText2,0
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon2.txt,"~",12
|
||||
vis tIcon2,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon2.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity2.txt,"~",14
|
||||
vis tEntity2,1
|
||||
}
|
||||
if(type2.txt=="light")
|
||||
{
|
||||
vis btOnOff2,1
|
||||
vis bText2,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff2.val=sys0
|
||||
}
|
||||
if(type2.txt=="switch")
|
||||
{
|
||||
vis btOnOff2,1
|
||||
vis bText2,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff2.val=sys0
|
||||
}
|
||||
if(type2.txt=="text")
|
||||
{
|
||||
vis btOnOff2,0
|
||||
vis bText2,1
|
||||
tsw bText2,0
|
||||
bText2.pco=65535
|
||||
bText2.pco2=65535
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText2.txt,"~",15
|
||||
}
|
||||
if(type2.txt=="button")
|
||||
{
|
||||
vis btOnOff2,0
|
||||
vis bText2,1
|
||||
tsw bText2,1
|
||||
bText2.pco=1374
|
||||
bText2.pco2=1374
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText2.txt,"~",15
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
@@ -541,6 +686,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -1192,6 +1192,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ Text tVersion
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text : 34
|
||||
Text : 35
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture p0
|
||||
|
||||
@@ -12,43 +12,244 @@ Page popupLight
|
||||
|
||||
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
|
||||
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
|
||||
// data available
|
||||
if(usize>1)
|
||||
{
|
||||
bufferPos=0
|
||||
while(bufferPos<usize)
|
||||
{
|
||||
// check for 0x55 0xBB - Command Init Secuence
|
||||
if(u[bufferPos]==187&&u[bufferPos-1]==85)
|
||||
{
|
||||
//remove garbage at the start of the buffer if there's any to free buffer for command
|
||||
if(u[bufferPos]!=1)
|
||||
{
|
||||
udelete bufferPos-1
|
||||
}
|
||||
//instruction is now aligned with buffer, because we deleted garbage before instrcution
|
||||
//get length after init sequence (check if there are more than to bytes in buffer)
|
||||
if(3<usize)
|
||||
{
|
||||
// check if serial buffer has reached the announced length
|
||||
ucopy payloadLength,2,2,0
|
||||
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
|
||||
payloadLength+=3
|
||||
// payload length does also not contain crc, so we are adding another 2 bytes for crc
|
||||
payloadLength+=2
|
||||
if(payloadLength<usize)
|
||||
{
|
||||
// calculate crc
|
||||
crcrest 1,0xFFFF
|
||||
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
|
||||
//crcputu 3,u[2]
|
||||
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
|
||||
crcputu 0,payloadLength-1
|
||||
// get recived crc to be able to compare it
|
||||
ucopy recvCrc,payloadLength-1,2,0
|
||||
// compare crc with recived value
|
||||
if(crcval==recvCrc)
|
||||
{
|
||||
// crc is okay
|
||||
// here is the location where acual code should be
|
||||
// write command to variable strCommand
|
||||
ucopy strCommand.txt,4,payloadLength-5,0
|
||||
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
if(tInstruction.txt=="entityUpdateDetail")
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon1.txt,"~",1
|
||||
vis tIcon1,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon1.pco=sys0
|
||||
// get Button State
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff1.val=sys0
|
||||
// get Brightness value
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
if(tTmp.txt=="disable")
|
||||
{
|
||||
vis t1,0
|
||||
vis t2,0
|
||||
vis hBrightness,0
|
||||
}else
|
||||
{
|
||||
vis t1,1
|
||||
vis t2,1
|
||||
vis hBrightness,1
|
||||
covx tTmp.txt,sys0,0,0
|
||||
if(tmCooldown.en==0)
|
||||
{
|
||||
hBrightness.val=sys0
|
||||
}
|
||||
}
|
||||
// get ColorTemp value
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
if(tTmp.txt=="disable")
|
||||
{
|
||||
vis hTempSlider,0
|
||||
vis t3,0
|
||||
vis t4,0
|
||||
mode_temp.val=0
|
||||
// mode == 1 is temp controls currently shown
|
||||
if(mode.val==1)
|
||||
{
|
||||
// switch mode
|
||||
click bColor,1
|
||||
click bColor,0
|
||||
}
|
||||
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
|
||||
{
|
||||
mode_temp.val=1
|
||||
// mode == 1 is temp controls currently shown
|
||||
if(mode.val==1)
|
||||
{
|
||||
// switch mode
|
||||
click bColor,1
|
||||
click bColor,0
|
||||
}
|
||||
}else
|
||||
{
|
||||
mode_temp.val=1
|
||||
vis hTempSlider,1
|
||||
vis t3,1
|
||||
vis t4,1
|
||||
if(tmCooldown.en==0)
|
||||
{
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hTempSlider.val=sys0
|
||||
}
|
||||
// mode == 0 is rgb controls currently shown
|
||||
if(mode.val==0)
|
||||
{
|
||||
// switch mode
|
||||
click bColor,1
|
||||
click bColor,0
|
||||
}
|
||||
}
|
||||
// get Color value
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
// disable -> 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++
|
||||
}
|
||||
}
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
|
||||
@@ -381,6 +381,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -422,6 +422,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardAlarm
|
||||
}
|
||||
if(tId.txt=="cardQR")
|
||||
{
|
||||
page cardQR
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
Reference in New Issue
Block a user