icons for shutters are now configurable (add nextion2text)

This commit is contained in:
joBr99
2022-05-22 07:55:05 +00:00
committed by github-actions[bot]
parent 8228ecb6c9
commit bb65a3cc54
18 changed files with 1058 additions and 377 deletions

View File

@@ -2251,25 +2251,40 @@ Timer tmSerial
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",8
// up button
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
bUp1.pco=27501
tsw bUp1,0
}else
if(tTmp.txt!="")
{
bUp1.pco=65535
tsw bUp1,1
}else if(tTmp.txt!="disable")
{
bUp1.pco=27501
tsw bUp1,0
}
// stop button
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
if(tTmp.txt!="")
{
bStop1.pco=65535
bStop1.txt=tTmp.txt
tsw bStop1,1
}else if(tTmp.txt!="disable")
{
bStop1.pco=27501
tsw bStop1,0
}
// down button
spstr tId.txt,tTmp.txt,"|",2
if(tTmp.txt!="")
{
bDown1.pco=65535
bDown1.txt=tTmp.txt
tsw bDown1,1
}else if(tTmp.txt!="disable")
{
bDown1.pco=27501
tsw bDown1,0
}else
{
bDown1.pco=65535
tsw bDown1,1
}
}
if(type1.txt=="light")
@@ -2395,25 +2410,40 @@ Timer tmSerial
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",14
// up button
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
bUp2.pco=27501
tsw bUp2,0
}else
if(tTmp.txt!="")
{
bUp2.pco=65535
tsw bUp2,1
}else if(tTmp.txt!="disable")
{
bUp2.pco=27501
tsw bUp2,0
}
// stop button
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
if(tTmp.txt!="")
{
bStop2.pco=65535
bStop2.txt=tTmp.txt
tsw bStop2,1
}else if(tTmp.txt!="disable")
{
bStop2.pco=27501
tsw bStop2,0
}
// down button
spstr tId.txt,tTmp.txt,"|",2
if(tTmp.txt!="")
{
bDown2.pco=65535
bDown2.txt=tTmp.txt
tsw bDown2,1
}else if(tTmp.txt!="disable")
{
bDown2.pco=27501
tsw bDown2,0
}else
{
bDown2.pco=65535
tsw bDown2,1
}
}
if(type2.txt=="light")
@@ -2539,25 +2569,40 @@ Timer tmSerial
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",20
// up button
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
bUp3.pco=27501
tsw bUp3,0
}else
if(tTmp.txt!="")
{
bUp3.pco=65535
tsw bUp3,1
}else if(tTmp.txt!="disable")
{
bUp3.pco=27501
tsw bUp3,0
}
// stop button
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
if(tTmp.txt!="")
{
bStop3.pco=65535
bStop3.txt=tTmp.txt
tsw bStop3,1
}else if(tTmp.txt!="disable")
{
bStop3.pco=27501
tsw bStop3,0
}
// down button
spstr tId.txt,tTmp.txt,"|",2
if(tTmp.txt!="")
{
bDown3.pco=65535
bDown3.txt=tTmp.txt
tsw bDown3,1
}else if(tTmp.txt!="disable")
{
bDown3.pco=27501
tsw bDown3,0
}else
{
bDown3.pco=65535
tsw bDown3,1
}
}
if(type3.txt=="light")
@@ -2683,25 +2728,40 @@ Timer tmSerial
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",26
// up button
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
bUp4.pco=27501
tsw bUp4,0
}else
if(tTmp.txt!="")
{
bUp4.pco=65535
tsw bUp4,1
}else if(tTmp.txt!="disable")
{
bUp4.pco=27501
tsw bUp4,0
}
// stop button
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
if(tTmp.txt!="")
{
bStop4.pco=65535
bStop4.txt=tTmp.txt
tsw bStop4,1
}else if(tTmp.txt!="disable")
{
bStop4.pco=27501
tsw bStop4,0
}
// down button
spstr tId.txt,tTmp.txt,"|",2
if(tTmp.txt!="")
{
bDown4.pco=65535
bDown4.txt=tTmp.txt
tsw bDown4,1
}else if(tTmp.txt!="disable")
{
bDown4.pco=27501
tsw bDown4,0
}else
{
bDown4.pco=65535
tsw bDown4,1
}
}
if(type4.txt=="light")

View File

@@ -10,10 +10,6 @@ pageTest
14 Component(s)
14 Line(s) of event code
14 Unique line(s) of event code
popupShutter
20 Component(s)
197 Line(s) of event code
111 Unique line(s) of event code
pageStartup
19 Component(s)
154 Line(s) of event code
@@ -38,6 +34,10 @@ cardQR
30 Component(s)
363 Line(s) of event code
205 Unique line(s) of event code
popupShutter
20 Component(s)
241 Line(s) of event code
138 Unique line(s) of event code
cardGrid
42 Component(s)
439 Line(s) of event code
@@ -52,11 +52,11 @@ cardThermo
290 Unique line(s) of event code
cardEntities
65 Component(s)
1069 Line(s) of event code
462 Unique line(s) of event code
1117 Line(s) of event code
487 Unique line(s) of event code
Total
13 Page(s)
402 Component(s)
4348 Line(s) of event code
1118 Unique line(s) of event code
4440 Line(s) of event code
1164 Unique line(s) of event code

View File

@@ -624,12 +624,63 @@ Timer tmSerial
{
// get Position value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
if(tTmp.txt=="disable")
{
vis tPosHeading,0
vis hPosition,0
}else
{
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
vis tPosHeading,1
vis hPosition,1
}
// set tinfo1 text
spstr strCommand.txt,tInfo1.txt,"~",2
// set tPosHeading (localization)
spstr strCommand.txt,tPosHeading.txt,"~",3
// set tIcon1
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
tIcon1.txt=tTmp.txt
}
// set icon bUp
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt!="")
{
bUp1.txt=tTmp.txt
tsw bUp1,1
bUp1.pco=65535
}else if(tTmp.txt!="disable")
{
tsw bUp1,0
bUp1.pco=27501
}
// set icon bStop
spstr strCommand.txt,tTmp.txt,"~",6
if(tTmp.txt!="")
{
bStop1.txt=tTmp.txt
tsw bStop1,1
bStop1.pco=65535
}else if(tTmp.txt!="disable")
{
tsw bStop1,0
bStop1.pco=27501
}
// set icon bDown
spstr strCommand.txt,tTmp.txt,"~",7
if(tTmp.txt!="")
{
bDown1.txt=tTmp.txt
tsw bDown1,1
bDown1.pco=65535
}else if(tTmp.txt!="disable")
{
tsw bDown1,0
bDown1.pco=27501
}
}
if(tInstruction.txt=="dimmode")
{
@@ -722,15 +773,6 @@ Timer tmSerial
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0