. (add nextion2text)

This commit is contained in:
joBr99
2022-03-22 15:09:16 +00:00
committed by GitHub Actions
parent cbfd803a65
commit 277b2ccfd6
2 changed files with 83 additions and 96 deletions

View File

@@ -22,10 +22,6 @@ pageSwipeTest
18 Component(s)
62 Line(s) of event code
44 Unique line(s) of event code
popupLight
27 Component(s)
338 Line(s) of event code
170 Unique line(s) of event code
pageTest
14 Component(s)
14 Line(s) of event code
@@ -50,6 +46,10 @@ cardThermo
42 Component(s)
412 Line(s) of event code
221 Unique line(s) of event code
popupLight
26 Component(s)
343 Line(s) of event code
165 Unique line(s) of event code
cardEntities
54 Component(s)
808 Line(s) of event code
@@ -61,6 +61,6 @@ cardAlarm
Total
14 Page(s)
350 Component(s)
3256 Line(s) of event code
843 Unique line(s) of event code
349 Component(s)
3261 Line(s) of event code
823 Unique line(s) of event code

View File

@@ -78,15 +78,9 @@ Variable (int32) mode
Scope: local
Value: 1
Variable (int32) mode_bright
Attributes
ID : 24
Scope: local
Value: 0
Variable (int32) mode_temp
Attributes
ID : 25
ID : 24
Scope: local
Value: 0
@@ -392,7 +386,7 @@ Text tId
Text t0
Attributes
ID : 26
ID : 25
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -710,11 +704,6 @@ Button bColor
mode.val=0
//enable color wheel
vis pColorWheel,1
//vis t0,1
//disable brightness
//vis t1,0
//vis t2,0
//vis hBrightness,0
//disable color temp
vis t4,0
vis t3,0
@@ -724,14 +713,6 @@ Button bColor
mode.val=1
//disable color wheel
vis pColorWheel,0
//vis t0,0
//if(mode_bright.val==1)
//{
// //enable brightness
// vis t1,1
// vis t2,1
// vis hBrightness,1
//}
if(mode_temp.val==1)
{
//enable color temp
@@ -885,46 +866,61 @@ Timer tmSerial
vis t1,0
vis t2,0
vis hBrightness,0
mode_bright.val=0
}else
{
vis t1,1
vis t2,1
vis hBrightness,1
mode_bright.val=1
covx tTmp.txt,sys0,0,0
hBrightness.val=sys0
}
if(mode.val==1)
{
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,",",5
if(tTmp.txt=="unknown")
if(tTmp.txt=="disable")
{
click bColor,1
mode_temp.val=1
}else if(tTmp.txt=="disable")
{
vis t4,0
vis t3,0
vis hTempSlider,0
mode_temp.val=0
vis t3,0
vis t4,0
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
{
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else
{
vis t4,1
vis t3,1
vis hTempSlider,1
mode_temp.val=1
covx tTmp.txt,sys0,0,0
hTempSlider.val=sys0
}
}
// get ColorWheel value
spstr strCommand.txt,tTmp.txt,",",6
if(tTmp.txt!="disable")
vis t3,1
vis t4,1
// mode == 0 is rgb controls currently shown
if(mode.val==0)
{
// switch mode
click bColor,1
click bColor,0
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,",",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
vis t0,0
vis bColor,0
}else
{
vis bColor,1
vis t0,1
vis bColor,1
}
}
if(tInstruction.txt=="time")
@@ -949,10 +945,6 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,",",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
@@ -990,21 +982,16 @@ Timer tmSerial
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0