fixed popup pages (add nextion2text)

This commit is contained in:
joBr99
2022-04-01 17:26:00 +00:00
committed by GitHub Actions
parent 13d353d65f
commit 809acb3962
23 changed files with 415 additions and 249 deletions

View File

@@ -460,70 +460,70 @@ 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")
{
// get entn
spstr strCommand.txt,entn.txt,"|",1
spstr strCommand.txt,entn.txt,"~",1
// get Heading
spstr strCommand.txt,tHeading.txt,"|",2
spstr strCommand.txt,tHeading.txt,"~",2
// heading color
spstr strCommand.txt,tTmp.txt,"|",3
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tHeading.pco=sys0
// get b1
spstr strCommand.txt,b1.txt,"|",4
spstr strCommand.txt,b1.txt,"~",4
if(b1.txt!="")
{
vis b1,1
}
// b1 color
spstr strCommand.txt,tTmp.txt,"|",5
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
b1.pco=sys0
// get b2
spstr strCommand.txt,b2.txt,"|",6
spstr strCommand.txt,b2.txt,"~",6
if(b2.txt!="")
{
vis b2,1
}
// b2 color
spstr strCommand.txt,tTmp.txt,"|",7
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
b2.pco=sys0
// get tText
spstr strCommand.txt,tText.txt,"|",8
spstr strCommand.txt,tText.txt,"~",8
// tText color
spstr strCommand.txt,tTmp.txt,"|",9
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,sys0,0,0
tText.pco=sys0
//preserve old sleepTimeout
vaOldSleepT.val=sleepTimeout
// sleep timeout
spstr strCommand.txt,tTmp.txt,"|",10
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
sleepTimeout=sys0
}
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")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
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=="exitPopup")
@@ -535,11 +535,11 @@ Timer tmSerial
sleepTimeout=vaOldSleepT.val
//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