mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-24 00:14:26 +01:00
swap default tasmota driver (add nextion2text)
This commit is contained in:
@@ -14,30 +14,26 @@ cardMedia
|
|||||||
22 Component(s)
|
22 Component(s)
|
||||||
210 Line(s) of event code
|
210 Line(s) of event code
|
||||||
116 Unique 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
|
pageStartup
|
||||||
19 Component(s)
|
19 Component(s)
|
||||||
145 Line(s) of event code
|
145 Line(s) of event code
|
||||||
110 Unique 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
|
pageSwipeTest
|
||||||
18 Component(s)
|
18 Component(s)
|
||||||
62 Line(s) of event code
|
62 Line(s) of event code
|
||||||
44 Unique line(s) of event code
|
44 Unique line(s) of event code
|
||||||
popupShutter
|
popupShutter
|
||||||
19 Component(s)
|
19 Component(s)
|
||||||
148 Line(s) of event code
|
195 Line(s) of event code
|
||||||
84 Unique line(s) of event code
|
107 Unique line(s) of event code
|
||||||
pageTest
|
pageTest
|
||||||
14 Component(s)
|
14 Component(s)
|
||||||
14 Line(s) of event code
|
14 Line(s) of event code
|
||||||
14 Unique 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
|
screensaver
|
||||||
25 Component(s)
|
25 Component(s)
|
||||||
173 Line(s) of event code
|
173 Line(s) of event code
|
||||||
@@ -46,6 +42,10 @@ cardAlarm
|
|||||||
28 Component(s)
|
28 Component(s)
|
||||||
147 Line(s) of event code
|
147 Line(s) of event code
|
||||||
106 Unique 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
|
cardEntities
|
||||||
54 Component(s)
|
54 Component(s)
|
||||||
808 Line(s) of event code
|
808 Line(s) of event code
|
||||||
@@ -54,13 +54,13 @@ cardGrid
|
|||||||
39 Component(s)
|
39 Component(s)
|
||||||
406 Line(s) of event code
|
406 Line(s) of event code
|
||||||
224 Unique line(s) of event code
|
224 Unique line(s) of event code
|
||||||
cardThermo
|
popupLight
|
||||||
42 Component(s)
|
27 Component(s)
|
||||||
438 Line(s) of event code
|
339 Line(s) of event code
|
||||||
221 Unique line(s) of event code
|
171 Unique line(s) of event code
|
||||||
|
|
||||||
Total
|
Total
|
||||||
14 Page(s)
|
14 Page(s)
|
||||||
342 Component(s)
|
342 Component(s)
|
||||||
3080 Line(s) of event code
|
3169 Line(s) of event code
|
||||||
776 Unique line(s) of event code
|
787 Unique line(s) of event code
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ Text tVersion
|
|||||||
Horizontal Alignment : center
|
Horizontal Alignment : center
|
||||||
Vertical Alignment : center
|
Vertical Alignment : center
|
||||||
Input Type : character
|
Input Type : character
|
||||||
Text : 4
|
Text : 6
|
||||||
Max. Text Size : 10
|
Max. Text Size : 10
|
||||||
Word wrap : disabled
|
Word wrap : disabled
|
||||||
Horizontal Spacing : 0
|
Horizontal Spacing : 0
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Page popupLight
|
|||||||
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
|
||||||
@@ -360,7 +360,7 @@ Text tInstruction
|
|||||||
Horizontal Spacing : 0
|
Horizontal Spacing : 0
|
||||||
Vertical Spacing : 0
|
Vertical Spacing : 0
|
||||||
|
|
||||||
Text tItem
|
Text tId
|
||||||
Attributes
|
Attributes
|
||||||
ID : 19
|
ID : 19
|
||||||
Scope : local
|
Scope : local
|
||||||
@@ -653,7 +653,23 @@ Button b0
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Touch Press Event
|
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
|
Button bColor
|
||||||
Attributes
|
Attributes
|
||||||
@@ -938,6 +954,43 @@ Timer tmSerial
|
|||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
bufferPos=0
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,21 +25,6 @@ Page popupNotify
|
|||||||
vis tTmp,0
|
vis tTmp,0
|
||||||
vis tInstruction,0
|
vis tInstruction,0
|
||||||
vis tId,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
|
Variable (string) strCommand
|
||||||
Attributes
|
Attributes
|
||||||
@@ -286,7 +271,23 @@ Button b0
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Touch Press Event
|
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
|
Button b2
|
||||||
Attributes
|
Attributes
|
||||||
@@ -527,15 +528,11 @@ Timer tmSerial
|
|||||||
spstr strCommand.txt,tId.txt,",",1
|
spstr strCommand.txt,tId.txt,",",1
|
||||||
//save second arg if there's one
|
//save second arg if there's one
|
||||||
spstr strCommand.txt,tTmp.txt,",",2
|
spstr strCommand.txt,tTmp.txt,",",2
|
||||||
if(tId.txt=="pageNotify")
|
//save third arg if there's one
|
||||||
{
|
spstr strCommand.txt,pageIcons.tTmp2.txt,",",3
|
||||||
//yay, we are already on the correct page
|
//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 ...
|
||||||
}else
|
udelete payloadLength-1
|
||||||
{
|
bufferPos=0
|
||||||
//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=="popupLight")
|
||||||
{
|
{
|
||||||
pageIcons.tTmp1.txt=tTmp.txt
|
pageIcons.tTmp1.txt=tTmp.txt
|
||||||
@@ -553,9 +550,13 @@ Timer tmSerial
|
|||||||
{
|
{
|
||||||
page pageStartup
|
page pageStartup
|
||||||
}
|
}
|
||||||
if(tId.txt=="pageThermo")
|
if(tId.txt=="cardGrid")
|
||||||
{
|
{
|
||||||
page cardThermo
|
page cardGrid
|
||||||
|
}
|
||||||
|
if(tId.txt=="cardAlarm")
|
||||||
|
{
|
||||||
|
page cardAlarm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end of user code
|
// end of user code
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Page popupShutter
|
|||||||
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
|
||||||
@@ -209,7 +209,7 @@ Text tInstruction
|
|||||||
Horizontal Spacing : 0
|
Horizontal Spacing : 0
|
||||||
Vertical Spacing : 0
|
Vertical Spacing : 0
|
||||||
|
|
||||||
Text tItem
|
Text tId
|
||||||
Attributes
|
Attributes
|
||||||
ID : 12
|
ID : 12
|
||||||
Scope : local
|
Scope : local
|
||||||
@@ -367,7 +367,23 @@ Button b0
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Touch Press Event
|
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
|
Button bDown1
|
||||||
Attributes
|
Attributes
|
||||||
@@ -633,6 +649,48 @@ 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
|
||||||
|
//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
|
// end of user code
|
||||||
udelete payloadLength-1
|
udelete payloadLength-1
|
||||||
bufferPos=0
|
bufferPos=0
|
||||||
|
|||||||
Reference in New Issue
Block a user