swap default tasmota driver (add nextion2text)

This commit is contained in:
joBr99
2022-03-20 16:18:47 +00:00
committed by GitHub Actions
parent 9aaed49a2f
commit 26ee4a206c
5 changed files with 162 additions and 50 deletions

View File

@@ -14,30 +14,26 @@ cardMedia
22 Component(s)
210 Line(s) of event code
116 Unique line(s) of event code
popupNotify
16 Component(s)
167 Line(s) of event code
110 Unique line(s) of event code
pageStartup
19 Component(s)
145 Line(s) of event code
110 Unique line(s) of event code
popupNotify
16 Component(s)
167 Line(s) of event code
111 Unique line(s) of event code
pageSwipeTest
18 Component(s)
62 Line(s) of event code
44 Unique line(s) of event code
popupShutter
19 Component(s)
148 Line(s) of event code
84 Unique line(s) of event code
195 Line(s) of event code
107 Unique line(s) of event code
pageTest
14 Component(s)
14 Line(s) of event code
14 Unique line(s) of event code
popupLight
27 Component(s)
297 Line(s) of event code
154 Unique line(s) of event code
screensaver
25 Component(s)
173 Line(s) of event code
@@ -46,6 +42,10 @@ cardAlarm
28 Component(s)
147 Line(s) of event code
106 Unique line(s) of event code
cardThermo
42 Component(s)
438 Line(s) of event code
221 Unique line(s) of event code
cardEntities
54 Component(s)
808 Line(s) of event code
@@ -54,13 +54,13 @@ cardGrid
39 Component(s)
406 Line(s) of event code
224 Unique line(s) of event code
cardThermo
42 Component(s)
438 Line(s) of event code
221 Unique line(s) of event code
popupLight
27 Component(s)
339 Line(s) of event code
171 Unique line(s) of event code
Total
14 Page(s)
342 Component(s)
3080 Line(s) of event code
776 Unique line(s) of event code
3169 Line(s) of event code
787 Unique line(s) of event code

View File

@@ -402,7 +402,7 @@ Text tVersion
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 4
Text : 6
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0

View File

@@ -28,7 +28,7 @@ Page popupLight
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tItem,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
@@ -360,7 +360,7 @@ Text tInstruction
Horizontal Spacing : 0
Vertical Spacing : 0
Text tItem
Text tId
Attributes
ID : 19
Scope : local
@@ -653,7 +653,23 @@ Button b0
Events
Touch Press Event
page cardEntities
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,pageOpen,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bColor
Attributes
@@ -938,6 +954,43 @@ Timer tmSerial
udelete payloadLength-1
bufferPos=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
//save third arg if there's one
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
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
}
}
}

View File

@@ -25,21 +25,6 @@ Page popupNotify
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,notify"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Variable (string) strCommand
Attributes
@@ -286,7 +271,23 @@ Button b0
Events
Touch Press Event
page cardEntities
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,pageOpen,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
@@ -527,15 +528,11 @@ Timer tmSerial
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
{
//save third arg if there's one
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
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
@@ -553,9 +550,13 @@ Timer tmSerial
{
page pageStartup
}
if(tId.txt=="pageThermo")
if(tId.txt=="cardGrid")
{
page cardThermo
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code

View File

@@ -28,7 +28,7 @@ Page popupShutter
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tItem,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
@@ -209,7 +209,7 @@ Text tInstruction
Horizontal Spacing : 0
Vertical Spacing : 0
Text tItem
Text tId
Attributes
ID : 12
Scope : local
@@ -367,7 +367,23 @@ Button b0
Events
Touch Press Event
page cardEntities
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,pageOpen,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown1
Attributes
@@ -633,6 +649,48 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,",",1
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
//save third arg if there's one
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
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=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0