updated us versions (add nextion2text)

This commit is contained in:
joBr99
2022-04-01 18:14:34 +00:00
committed by GitHub Actions
parent 1272732bb5
commit d4f78c0293
50 changed files with 1567 additions and 5435 deletions

View File

@@ -30,26 +30,6 @@ Page screensaver
vis tSend,0
//page open event
// clear weather elements, to keep example content in HMI
tMainIcon.txt=""
tMainText.txt=""
tForecast1.txt=""
tF1Icon.txt=""
tForecast1Val.txt=""
tForecast2.txt=""
tF2Icon.txt=""
tForecast2Val.txt=""
//tSend.txt="event,screensaverOpen"
//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
@@ -106,7 +86,7 @@ Text tDate
Send Component ID : disabled
Associated Keyboard : none
Text : Tuesday, 08. March 2022
Max. Text Size : 30
Max. Text Size : 35
Text tSend
Attributes
@@ -125,7 +105,7 @@ Text tMainIcon
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Text :
Max. Text Size : 10
Text tMainText
@@ -135,7 +115,7 @@ Text tMainText
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 2,3 °C
Text :
Max. Text Size : 10
Text tForecast1
@@ -145,7 +125,7 @@ Text tForecast1
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Mi
Text :
Max. Text Size : 10
Text tForecast1Val
@@ -155,7 +135,7 @@ Text tForecast1Val
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 9,3 °C
Text :
Max. Text Size : 10
Text tF1Icon
@@ -165,7 +145,7 @@ Text tF1Icon
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Text :
Max. Text Size : 10
Text tForecast2
@@ -175,7 +155,7 @@ Text tForecast2
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Do
Text :
Max. Text Size : 10
Text tF2Icon
@@ -185,7 +165,7 @@ Text tF2Icon
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Text :
Max. Text Size : 10
Text tForecast2Val
@@ -195,7 +175,7 @@ Text tForecast2Val
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 11,9 °C
Text :
Max. Text Size : 10
Text t10
@@ -266,7 +246,7 @@ Text tF4Icon
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Max. Text Size : 5
Text tForecast4Val
Attributes
@@ -278,6 +258,46 @@ Text tForecast4Val
Text :
Max. Text Size : 10
Text tMainTextAlt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainIconAlt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMRIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMR
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
@@ -335,7 +355,7 @@ Timer tmSerial
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,",",0
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="wake")
{
//dim=100
@@ -344,14 +364,14 @@ Timer tmSerial
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,",",1
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="time")
{
//get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
@@ -362,66 +382,104 @@ Timer tmSerial
if(tInstruction.txt=="date")
{
//get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
tDate.txt=pageIcons.vaDate.txt
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,",",1
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="weatherUpdate")
{
vis tMainIcon,1
vis tMainIconAlt,0
vis tMainText,1
vis tMainTextAlt,0
vis tMRIcon,0
vis tMR,0
//tMainIcon
spstr strCommand.txt,tTmp.txt,"?",1
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMainIcon.txt,sys0,1
tMainIconAlt.txt=tMainIcon.txt
//tMainText
spstr strCommand.txt,tMainText.txt,"?",2
spstr strCommand.txt,tMainText.txt,"~",2
tMainTextAlt.txt=tMainText.txt
//tForecast1
spstr strCommand.txt,tForecast1.txt,"?",3
spstr strCommand.txt,tForecast1.txt,"~",3
//tF1Icon
spstr strCommand.txt,tTmp.txt,"?",4
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF1Icon.txt,sys0,1
//tForecast1Val
spstr strCommand.txt,tForecast1Val.txt,"?",5
spstr strCommand.txt,tForecast1Val.txt,"~",5
//tForecast2
spstr strCommand.txt,tForecast2.txt,"?",6
spstr strCommand.txt,tForecast2.txt,"~",6
//tF2Icon
spstr strCommand.txt,tTmp.txt,"?",7
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF2Icon.txt,sys0,1
//tForecast2Val
spstr strCommand.txt,tForecast2Val.txt,"?",8
spstr strCommand.txt,tForecast2Val.txt,"~",8
//tForecast3
spstr strCommand.txt,tForecast3.txt,"?",9
spstr strCommand.txt,tForecast3.txt,"~",9
//tF3Icon
spstr strCommand.txt,tTmp.txt,"?",10
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF3Icon.txt,sys0,1
//tForecast3Val
spstr strCommand.txt,tForecast3Val.txt,"?",11
spstr strCommand.txt,tForecast3Val.txt,"~",11
//tForecast4
spstr strCommand.txt,tForecast4.txt,"?",12
spstr strCommand.txt,tForecast4.txt,"~",12
//tF4Icon
spstr strCommand.txt,tTmp.txt,"?",13
spstr strCommand.txt,tTmp.txt,"~",13
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF4Icon.txt,sys0,1
//tForecast4Val
spstr strCommand.txt,tForecast4Val.txt,"?",14
spstr strCommand.txt,tForecast4Val.txt,"~",14
//alternative layout
//tMRIcon
spstr strCommand.txt,tTmp.txt,"~",15
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMRIcon.txt,sys0,1
if(tTmp.txt!="")
{
//value for tMRIcon, activate alternative layout
vis tMainIcon,0
vis tMainText,0
vis tMainTextAlt,1
vis tMainIconAlt,1
vis tMRIcon,1
vis tMR,1
vis tForecast1,0
vis tF1Icon,0
vis tForecast1Val,0
//move forecast values to the right
tForecast4.txt=tForecast3.txt
tForecast3.txt=tForecast2.txt
tForecast2.txt=tForecast1.txt
tForecast4Val.txt=tForecast3Val.txt
tForecast3Val.txt=tForecast2Val.txt
tForecast2Val.txt=tForecast1Val.txt
tF4Icon.txt=tF3Icon.txt
tF3Icon.txt=tF2Icon.txt
tF2Icon.txt=tF1Icon.txt
}
//tMR
spstr strCommand.txt,tMR.txt,"~",16
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,",",1
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,",",2
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,",",3
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 u[2]+3
bufferPos=0