mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 23:44:25 +01:00
Add nextion2text
This commit is contained in:
@@ -1583,6 +1583,10 @@ Timer tmSerial
|
|||||||
{
|
{
|
||||||
page pageStartup
|
page pageStartup
|
||||||
}
|
}
|
||||||
|
if(tId.txt=="pageNotify")
|
||||||
|
{
|
||||||
|
page popupNotify
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(tInstruction.txt=="time")
|
if(tInstruction.txt=="time")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -484,6 +484,10 @@ Timer tmSerial
|
|||||||
{
|
{
|
||||||
page pageStartup
|
page pageStartup
|
||||||
}
|
}
|
||||||
|
if(tId.txt=="pageNotify")
|
||||||
|
{
|
||||||
|
page popupNotify
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// end of user code
|
// end of user code
|
||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
|
|||||||
@@ -513,6 +513,10 @@ Timer tmSerial
|
|||||||
{
|
{
|
||||||
page pageStartup
|
page pageStartup
|
||||||
}
|
}
|
||||||
|
if(tId.txt=="pageNotify")
|
||||||
|
{
|
||||||
|
page popupNotify
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// end of user code
|
// end of user code
|
||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
|
|||||||
@@ -323,6 +323,10 @@ Timer tmSerial
|
|||||||
{
|
{
|
||||||
page pageStartup
|
page pageStartup
|
||||||
}
|
}
|
||||||
|
if(tId.txt=="pageNotify")
|
||||||
|
{
|
||||||
|
page popupNotify
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// end of user code
|
// end of user code
|
||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Page popupNotify
|
|||||||
vis tSend,0
|
vis tSend,0
|
||||||
vis tTmp,0
|
vis tTmp,0
|
||||||
vis tInstruction,0
|
vis tInstruction,0
|
||||||
vis tItem,0
|
vis tId,0
|
||||||
//page open event
|
//page open event
|
||||||
// event,pageOpenDetail,typeOfPage,tEntityName
|
// event,pageOpenDetail,typeOfPage,tEntityName
|
||||||
// craft command
|
// craft command
|
||||||
@@ -74,7 +74,7 @@ Text tInstruction
|
|||||||
Text :
|
Text :
|
||||||
Max. Text Size : 20
|
Max. Text Size : 20
|
||||||
|
|
||||||
Text tItem
|
Text tId
|
||||||
Attributes
|
Attributes
|
||||||
ID : 10
|
ID : 10
|
||||||
Scope : local
|
Scope : local
|
||||||
@@ -290,6 +290,44 @@ Timer tmSerial
|
|||||||
spstr strCommand.txt,tTmp.txt,",",1
|
spstr strCommand.txt,tTmp.txt,",",1
|
||||||
covx tTmp.txt,sleepTimeout,0,0
|
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
|
||||||
|
//save second arg if there's one
|
||||||
|
spstr strCommand.txt,tTmp.txt,",",2
|
||||||
|
if(tId.txt=="pageNotify")
|
||||||
|
{
|
||||||
|
//yay, we are already on the correct page
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//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 u[2]+3
|
||||||
|
bufferPos=0
|
||||||
|
}
|
||||||
|
if(tId.txt=="popupLight")
|
||||||
|
{
|
||||||
|
pageIcons.tTmp1.txt=tTmp.txt
|
||||||
|
page popupLight
|
||||||
|
}
|
||||||
|
if(tId.txt=="cardEntities")
|
||||||
|
{
|
||||||
|
page cardEntities
|
||||||
|
}
|
||||||
|
if(tId.txt=="cardMedia")
|
||||||
|
{
|
||||||
|
page cardMedia
|
||||||
|
}
|
||||||
|
if(tId.txt=="pageStartup")
|
||||||
|
{
|
||||||
|
page pageStartup
|
||||||
|
}
|
||||||
|
if(tId.txt=="pageThermo")
|
||||||
|
{
|
||||||
|
page cardThermo
|
||||||
|
}
|
||||||
|
}
|
||||||
// end of user code
|
// end of user code
|
||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
bufferPos=0
|
bufferPos=0
|
||||||
|
|||||||
@@ -416,6 +416,10 @@ Timer tmSerial
|
|||||||
{
|
{
|
||||||
page pageStartup
|
page pageStartup
|
||||||
}
|
}
|
||||||
|
if(tId.txt=="pageNotify")
|
||||||
|
{
|
||||||
|
page popupNotify
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// end of user code
|
// end of user code
|
||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
|
|||||||
Reference in New Issue
Block a user