change default delimiter from , to ~ (add nextion2text)

This commit is contained in:
joBr99
2022-04-01 14:58:13 +00:00
committed by GitHub Actions
parent f45e99eb2c
commit cabe1d4443
23 changed files with 3149 additions and 467 deletions

View File

@@ -784,24 +784,24 @@ Timer tmSerial
// 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
spstr strCommand.txt,tInstruction.txt,"}",0
if(tInstruction.txt=="entityUpdateDetail")
{
// change icon
spstr strCommand.txt,tTmp.txt,",",1
spstr strCommand.txt,tTmp.txt,"}",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,",",2
spstr strCommand.txt,tTmp.txt,"}",2
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// get Button State
spstr strCommand.txt,tTmp.txt,",",3
spstr strCommand.txt,tTmp.txt,"}",3
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
// get Brightness value
spstr strCommand.txt,tTmp.txt,",",4
spstr strCommand.txt,tTmp.txt,"}",4
if(tTmp.txt=="disable")
{
vis t1,0
@@ -819,7 +819,7 @@ Timer tmSerial
}
}
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,",",5
spstr strCommand.txt,tTmp.txt,"}",5
if(tTmp.txt=="disable")
{
vis hTempSlider,0
@@ -863,7 +863,7 @@ Timer tmSerial
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,",",6
spstr strCommand.txt,tTmp.txt,"}",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
@@ -887,7 +887,7 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,"}",1
}
if(tInstruction.txt=="date")
{
@@ -897,24 +897,24 @@ Timer tmSerial
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,",",1
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
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
spstr strCommand.txt,tId.txt,"}",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,",",2
spstr strCommand.txt,tTmp.txt,"}",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,",",3
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