fixed screensaver pagetype (add nextion2text)

This commit is contained in:
joBr99
2022-03-31 10:46:03 +00:00
committed by GitHub Actions
parent 39c1aa6773
commit d908cb7d96
32 changed files with 680 additions and 173 deletions

View File

@@ -6,7 +6,7 @@ Program.s
int payloadLength=0
int par0=0,par1=0
// sleep timeout in s
int sleepTimeout=20
int sleepTimeout=2
int sleepValue=0
// dim value
int dimValue=40

View File

@@ -615,35 +615,48 @@ Timer tmSerial
//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
if(tId.txt=="popupLight")
if(tId.txt=="pageStartup")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardThermo")
if(tId.txt=="cardGrid")
{
page cardThermo
page cardGrid
}
if(tId.txt=="pageStartup")
if(tId.txt=="popupLight")
{
page pageStartup
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
if(tId.txt=="cardThermo")
{
page cardGrid
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
@@ -665,7 +678,7 @@ Timer tmSleep
Events
Timer Event
if(sleepTimeout!=0)
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)

View File

@@ -1714,7 +1714,7 @@ Timer tmSleep
Events
Timer Event
if(sleepTimeout!=0)
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)

View File

@@ -804,7 +804,7 @@ Timer tmSleep
Events
Timer Event
if(sleepTimeout!=0)
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)

View File

@@ -583,30 +583,43 @@ Timer tmSerial
//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
if(tId.txt=="popupLight")
if(tId.txt=="pageStartup")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardThermo")
if(tId.txt=="cardGrid")
{
page cardThermo
page cardGrid
}
if(tId.txt=="pageStartup")
if(tId.txt=="popupLight")
{
page pageStartup
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
if(tId.txt=="cardThermo")
{
page cardGrid
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
@@ -642,7 +655,7 @@ Timer tmSleep
Events
Timer Event
if(sleepTimeout!=0)
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)

View File

@@ -866,30 +866,43 @@ Timer tmSerial
//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
if(tId.txt=="popupLight")
if(tId.txt=="pageStartup")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
if(tId.txt=="cardGrid")
{
page cardMedia
page cardGrid
}
if(tId.txt=="pageStartup")
if(tId.txt=="popupLight")
{
page pageStartup
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
if(tId.txt=="cardThermo")
{
page cardGrid
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
@@ -916,7 +929,7 @@ Timer tmSleep
Events
Timer Event
if(sleepTimeout!=0)
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)

View File

@@ -152,7 +152,7 @@ Text tVersion
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 24
Text : 25
Max. Text Size : 10
Picture p0

View File

@@ -475,6 +475,25 @@ Timer tmSerial
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
vaTap.val=0
}
}
TouchCap tc0
Attributes
Scope: local