Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text)

This commit is contained in:
joBr99
2022-03-31 21:30:20 +00:00
committed by GitHub Actions
parent e3ef807c8a
commit 40cf7ca6ce
5 changed files with 144 additions and 191 deletions

View File

@@ -17,7 +17,6 @@ Page cardAlarm
vis tInstruction,0
vis tTmp,0
vis tId,0
//vis nPageDisp,0
vis arm1,0
vis arm2,0
vis arm3,0
@@ -171,7 +170,12 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,bPrev"
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}
tSend.txt+="bPrev"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -513,48 +517,75 @@ Timer tmSerial
{
//entn
spstr strCommand.txt,entn.txt,",",1
// navigation icons
spstr strCommand.txt,tId.txt,",",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,",",2
spstr strCommand.txt,arm1.txt,",",3
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,",",3
spstr strCommand.txt,va1.txt,",",4
//text arm2
spstr strCommand.txt,arm2.txt,",",4
spstr strCommand.txt,arm2.txt,",",5
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,",",5
spstr strCommand.txt,va2.txt,",",6
//text arm3
spstr strCommand.txt,arm3.txt,",",6
spstr strCommand.txt,arm3.txt,",",7
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,",",7
spstr strCommand.txt,va3.txt,",",8
//text arm4
spstr strCommand.txt,arm4.txt,",",8
spstr strCommand.txt,arm4.txt,",",9
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,",",9
spstr strCommand.txt,va4.txt,",",10
//icon
spstr strCommand.txt,tTmp.txt,",",10
spstr strCommand.txt,tTmp.txt,",",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//icon color
spstr strCommand.txt,tTmp.txt,",",11
spstr strCommand.txt,tTmp.txt,",",12
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,",",12
spstr strCommand.txt,tTmp.txt,",",13
if(tTmp.txt!="disable")
{
vis b0,1
@@ -569,9 +600,23 @@ Timer tmSerial
vis b9,1
vis b10,1
vis tCode,1
}else
{
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,",",13
spstr strCommand.txt,tTmp.txt,",",14
if(tTmp.txt=="enable")
{
tmFlash.en=1