updated us versions

This commit is contained in:
joBr99
2022-04-01 20:14:10 +02:00
parent 8a06bf8398
commit d4c5f41634
9 changed files with 21 additions and 21 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,17 +3,17 @@ head = sharedhead + """
if(tInstruction.txt=="entityUpd") if(tInstruction.txt=="entityUpd")
{ {
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4 // command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,",",1 spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation """ + navigation
print(head) print(head)
start = 3 start = 3
for i in range(1,5): for i in range(1,7):
idxstart = start + (i-1)*6 idxstart = start + (i-1)*6
item = f""" item = f"""
// get Type // get Type
spstr strCommand.txt,type{i}.txt,",",{idxstart} spstr strCommand.txt,type{i}.txt,"~",{idxstart}
// get internal name // get internal name
spstr strCommand.txt,entn{i}.txt,",",{idxstart+1} spstr strCommand.txt,entn{i}.txt,"~",{idxstart+1}
if(type{i}.txt=="delete"||type{i}.txt=="") if(type{i}.txt=="delete"||type{i}.txt=="")
{{ {{
vis bUp{i},0 vis bUp{i},0
@@ -28,16 +28,16 @@ for i in range(1,5):
}}else }}else
{{ {{
// change icon // change icon
spstr strCommand.txt,tTmp.txt,",",{idxstart+2} spstr strCommand.txt,tTmp.txt,"~",{idxstart+2}
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon{i}.txt,sys0,1 substr pageIcons.tIcons.txt,tIcon{i}.txt,sys0,1
vis tIcon{i},1 vis tIcon{i},1
// change icon color // change icon color
spstr strCommand.txt,tTmp.txt,",",{idxstart+3} spstr strCommand.txt,tTmp.txt,"~",{idxstart+3}
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
tIcon{i}.pco=sys0 tIcon{i}.pco=sys0
// set name // set name
spstr strCommand.txt,tEntity{i}.txt,",",{idxstart+4} spstr strCommand.txt,tEntity{i}.txt,"~",{idxstart+4}
vis tEntity{i},1 vis tEntity{i},1
}} }}
@@ -61,7 +61,7 @@ for i in range(1,5):
vis hSlider{i},0 vis hSlider{i},0
vis nNum{i},0 vis nNum{i},0
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",{idxstart+5} spstr strCommand.txt,tTmp.txt,"~",{idxstart+5}
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff{i}.val=sys0 btOnOff{i}.val=sys0
}} }}
@@ -75,7 +75,7 @@ for i in range(1,5):
vis hSlider{i},0 vis hSlider{i},0
vis nNum{i},0 vis nNum{i},0
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",{idxstart+5} spstr strCommand.txt,tTmp.txt,"~",{idxstart+5}
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff{i}.val=sys0 btOnOff{i}.val=sys0
}} }}
@@ -92,7 +92,7 @@ for i in range(1,5):
bText{i}.pco=65535 bText{i}.pco=65535
bText{i}.pco2=65535 bText{i}.pco2=65535
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText{i}.txt,",",{idxstart+5} spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5}
}} }}
if(type{i}.txt=="button") if(type{i}.txt=="button")
{{ {{
@@ -107,7 +107,7 @@ for i in range(1,5):
bText{i}.pco=1374 bText{i}.pco=1374
bText{i}.pco2=1374 bText{i}.pco2=1374
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText{i}.txt,",",{idxstart+5} spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5}
}} }}
if(type{i}.txt=="number") if(type{i}.txt=="number")
{{ {{
@@ -120,7 +120,7 @@ for i in range(1,5):
vis hSlider{i},1 vis hSlider{i},1
vis nNum{i},1 vis nNum{i},1
// get config (optional Value) (use bText as variable) // get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText{i}.txt,",",{idxstart+5} spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5}
//first value is current value //first value is current value
spstr bText{i}.txt,tTmp.txt,"|",0 spstr bText{i}.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0

View File

@@ -41,7 +41,7 @@ if(usize>1)
// write command to variable strCommand // write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0 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) // 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
""" """
sharedfoot = """ sharedfoot = """
@@ -49,11 +49,11 @@ sharedfoot = """
{ {
//command format pageType,specialPageName //command format pageType,specialPageName
//write name of speical page to tId //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 //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 //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 ... //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 udelete payloadLength-1
bufferPos=0 bufferPos=0
@@ -103,23 +103,23 @@ sharedfoot = """
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {
// get set time to global variable // get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,",",1 spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
} }
if(tInstruction.txt=="date") if(tInstruction.txt=="date")
{ {
// get set date to global variable // get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"?",1 spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
} }
if(tInstruction.txt=="dimmode") if(tInstruction.txt=="dimmode")
{ {
// get value // get value
spstr strCommand.txt,tTmp.txt,",",1 spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0 covx tTmp.txt,dimValue,0,0
} }
if(tInstruction.txt=="timeout") if(tInstruction.txt=="timeout")
{ {
//set timeout to global var //set timeout to global var
spstr strCommand.txt,tTmp.txt,",",1 spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0 covx tTmp.txt,sleepTimeout,0,0
} }
// end of user code // end of user code
@@ -137,7 +137,7 @@ sharedfoot = """
navigation = """ navigation = """
// navigation icons // navigation icons
spstr strCommand.txt,tId.txt,",",2 spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0 spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0") if(tTmp.txt=="0")
{ {

Binary file not shown.

Binary file not shown.

Binary file not shown.