preserve sleep also on page type command (add nextion2text)

This commit is contained in:
joBr99
2022-03-20 18:58:43 +00:00
committed by GitHub Actions
parent ffb06aa8e9
commit 701e7cffe7
3 changed files with 23 additions and 11 deletions

View File

@@ -40,6 +40,12 @@ Variable (string) entn
Text :
Max. Text Size: 30
Variable (int32) vaOldSleepT
Attributes
ID : 16
Scope: local
Value: 0
Text tSend
Attributes
ID : 3
@@ -271,6 +277,7 @@ Button b0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
@@ -323,6 +330,7 @@ Button b2
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress,D,D,"+entn.txt+",1,notifyAction,yes"
//send calc crc
@@ -371,6 +379,7 @@ Button b1
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress,D,D,"+entn.txt+",1,notifyAction,no"
//send calc crc
@@ -493,6 +502,8 @@ Timer tmSerial
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,"|",9
covx tTmp.txt,sys0,0,0
@@ -523,6 +534,7 @@ Timer tmSerial
}
if(tInstruction.txt=="pageType")
{
sleepTimeout=vaOldSleepT.val
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,",",1