moved time and date to pageicons (add nextion2text)

This commit is contained in:
joBr99
2022-03-30 20:32:27 +00:00
committed by GitHub Actions
parent 1f948c9320
commit 70538f9de2
27 changed files with 639 additions and 183 deletions

View File

@@ -10,6 +10,7 @@ Program.s
int sleepValue=0
// dim value
int dimValue=40
int dimValueNormal=100
// fix touch offset
lcd_dev fffb 0002 0000 0020
page pageStartup

View File

@@ -583,12 +583,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -1675,12 +1675,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -765,12 +765,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -551,12 +551,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -835,12 +835,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -10,6 +10,18 @@ Page pageIcons
Swide left page ID : disabled
Swide right page ID : disabled
Variable (string) vaTime
Attributes
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
Scope : global
Text :
Max. Text Size: 30
Text tIcons
Attributes
Scope : global

View File

@@ -261,12 +261,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -541,12 +541,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -298,12 +298,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="dimmode")
{

View File

@@ -341,12 +341,12 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
}
if(tInstruction.txt=="timeout")
{

View File

@@ -19,13 +19,13 @@ Page screensaver
vis p0,0
//load gloabl time string from pageIcons
//tTime.txt=vaTime.txt
spstr vaTime.txt,tTime.txt,"?",0
spstr vaTime.txt,tAMPM.txt,"?",1
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
{
vis tAMPM,0
}
tDate.txt=vaDate.txt
tDate.txt=pageIcons.vaDate.txt
dim=dimValue
vis tSend,0
//page open event
@@ -57,18 +57,6 @@ Variable (string) strCommand
Text :
Max. Text Size: 200
Variable (string) vaTime
Attributes
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
Scope : global
Text :
Max. Text Size: 30
Variable (string) tId
Attributes
Scope : local
@@ -363,9 +351,9 @@ Timer tmSerial
if(tInstruction.txt=="time")
{
//get set time to global variable
spstr strCommand.txt,vaTime.txt,",",1
spstr vaTime.txt,tTime.txt,"?",0
spstr vaTime.txt,tAMPM.txt,"?",1
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
{
vis tAMPM,0
@@ -374,8 +362,8 @@ Timer tmSerial
if(tInstruction.txt=="date")
{
//get set date to global variable
spstr strCommand.txt,vaDate.txt,"?",1
tDate.txt=vaDate.txt
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
tDate.txt=pageIcons.vaDate.txt
}
if(tInstruction.txt=="timeout")
{
@@ -494,7 +482,7 @@ TouchCap tc0
Events
Touch Press Event
dim=100
dim=dimValueNormal
vaTap.val+=1
covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
@@ -509,6 +497,4 @@ TouchCap tc0
prints sys0,2
prints tSend.txt,0
prints crcval,2
//dim=100
//page originPage.val