Merge branch 'main' of github.com:joBr99/nspanel-widget-ui

This commit is contained in:
Johannes Braun
2022-03-19 14:07:35 +01:00
3 changed files with 333 additions and 348 deletions

View File

@@ -1971,16 +1971,11 @@ Timer tmSerial
} }
if(tInstruction.txt=="entityUpd") if(tInstruction.txt=="entityUpd")
{ {
// command format: entityUpd,id,icon,name,type,optionalValue // command format: entityUpd[,type,internalName,iconId,displayName,optionalValue]x4
// write id to tId (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tId.txt,",",1
// id 1
if(tId.txt=="1")
{
// get Type // get Type
spstr strCommand.txt,type1.txt,",",2 spstr strCommand.txt,type1.txt,",",1
// get internal name // get internal name
spstr strCommand.txt,entn1.txt,",",3 spstr strCommand.txt,entn1.txt,",",2
if(type1.txt=="delete") if(type1.txt=="delete")
{ {
vis bUp1,0 vis bUp1,0
@@ -1993,12 +1988,12 @@ Timer tmSerial
}else }else
{ {
// change icon // change icon
spstr strCommand.txt,tTmp.txt,",",4 spstr strCommand.txt,tTmp.txt,",",3
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1 substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1 vis tIcon1,1
// set name // set name
spstr strCommand.txt,tEntity1.txt,",",5 spstr strCommand.txt,tEntity1.txt,",",4
vis tEntity1,1 vis tEntity1,1
} }
if(type1.txt=="shutter") if(type1.txt=="shutter")
@@ -2017,7 +2012,7 @@ Timer tmSerial
vis btOnOff1,1 vis btOnOff1,1
vis bText1,0 vis bText1,0
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",5
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0 btOnOff1.val=sys0
} }
@@ -2029,7 +2024,7 @@ Timer tmSerial
vis btOnOff1,1 vis btOnOff1,1
vis bText1,0 vis bText1,0
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",5
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0 btOnOff1.val=sys0
} }
@@ -2044,7 +2039,7 @@ Timer tmSerial
bText1.pco=65535 bText1.pco=65535
bText1.pco2=65535 bText1.pco2=65535
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,",",6 spstr strCommand.txt,bText1.txt,",",5
} }
if(type1.txt=="button") if(type1.txt=="button")
{ {
@@ -2057,16 +2052,13 @@ Timer tmSerial
bText1.pco=1374 bText1.pco=1374
bText1.pco2=1374 bText1.pco2=1374
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,",",6 spstr strCommand.txt,bText1.txt,",",5
} }
} // id2
// id 2
if(tId.txt=="2")
{
// get Type // get Type
spstr strCommand.txt,type2.txt,",",2 spstr strCommand.txt,type2.txt,",",6
// get internal name // get internal name
spstr strCommand.txt,entn2.txt,",",3 spstr strCommand.txt,entn2.txt,",",7
if(type2.txt=="delete") if(type2.txt=="delete")
{ {
vis bUp2,0 vis bUp2,0
@@ -2079,12 +2071,12 @@ Timer tmSerial
}else }else
{ {
//change icon //change icon
spstr strCommand.txt,tTmp.txt,",",4 spstr strCommand.txt,tTmp.txt,",",8
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon2.txt,sys0,1 substr pageIcons.tIcons.txt,tIcon2.txt,sys0,1
vis tIcon2,1 vis tIcon2,1
// set name // set name
spstr strCommand.txt,tEntity2.txt,",",5 spstr strCommand.txt,tEntity2.txt,",",9
vis tEntity2,1 vis tEntity2,1
} }
if(type2.txt=="shutter") if(type2.txt=="shutter")
@@ -2103,7 +2095,7 @@ Timer tmSerial
vis btOnOff2,1 vis btOnOff2,1
vis bText2,0 vis bText2,0
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",10
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0 btOnOff2.val=sys0
} }
@@ -2115,7 +2107,7 @@ Timer tmSerial
vis btOnOff2,1 vis btOnOff2,1
vis bText2,0 vis bText2,0
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",10
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0 btOnOff2.val=sys0
} }
@@ -2130,7 +2122,7 @@ Timer tmSerial
bText2.pco=65535 bText2.pco=65535
bText2.pco2=65535 bText2.pco2=65535
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,",",6 spstr strCommand.txt,bText2.txt,",",10
} }
if(type2.txt=="button") if(type2.txt=="button")
{ {
@@ -2143,16 +2135,13 @@ Timer tmSerial
bText2.pco=1374 bText2.pco=1374
bText2.pco2=1374 bText2.pco2=1374
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,",",6 spstr strCommand.txt,bText2.txt,",",10
} }
} // id3
// id 3
if(tId.txt=="3")
{
// get Type // get Type
spstr strCommand.txt,type3.txt,",",2 spstr strCommand.txt,type3.txt,",",11
// get internal name // get internal name
spstr strCommand.txt,entn3.txt,",",3 spstr strCommand.txt,entn3.txt,",",12
if(type3.txt=="delete") if(type3.txt=="delete")
{ {
vis bUp3,0 vis bUp3,0
@@ -2165,12 +2154,12 @@ Timer tmSerial
}else }else
{ {
//change icon //change icon
spstr strCommand.txt,tTmp.txt,",",4 spstr strCommand.txt,tTmp.txt,",",13
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon3.txt,sys0,1 substr pageIcons.tIcons.txt,tIcon3.txt,sys0,1
vis tIcon3,1 vis tIcon3,1
// set name // set name
spstr strCommand.txt,tEntity3.txt,",",5 spstr strCommand.txt,tEntity3.txt,",",14
vis tEntity3,1 vis tEntity3,1
} }
if(type3.txt=="shutter") if(type3.txt=="shutter")
@@ -2189,7 +2178,7 @@ Timer tmSerial
vis bText3,0 vis bText3,0
vis btOnOff3,1 vis btOnOff3,1
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",15
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0 btOnOff3.val=sys0
} }
@@ -2201,7 +2190,7 @@ Timer tmSerial
vis bText3,0 vis bText3,0
vis btOnOff3,1 vis btOnOff3,1
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",15
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0 btOnOff3.val=sys0
} }
@@ -2216,7 +2205,7 @@ Timer tmSerial
bText3.pco=65535 bText3.pco=65535
bText3.pco2=65535 bText3.pco2=65535
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,",",6 spstr strCommand.txt,bText3.txt,",",15
} }
if(type3.txt=="button") if(type3.txt=="button")
{ {
@@ -2229,16 +2218,13 @@ Timer tmSerial
bText3.pco=1374 bText3.pco=1374
bText3.pco2=1374 bText3.pco2=1374
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,",",6 spstr strCommand.txt,bText3.txt,",",15
} }
} // id4
// id 2
if(tId.txt=="4")
{
// get Type // get Type
spstr strCommand.txt,type4.txt,",",2 spstr strCommand.txt,type4.txt,",",16
// get internal name // get internal name
spstr strCommand.txt,entn4.txt,",",3 spstr strCommand.txt,entn4.txt,",",17
if(type4.txt=="delete") if(type4.txt=="delete")
{ {
vis bUp4,0 vis bUp4,0
@@ -2251,12 +2237,12 @@ Timer tmSerial
}else }else
{ {
//change icon //change icon
spstr strCommand.txt,tTmp.txt,",",4 spstr strCommand.txt,tTmp.txt,",",18
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon4.txt,sys0,1 substr pageIcons.tIcons.txt,tIcon4.txt,sys0,1
vis tIcon4,1 vis tIcon4,1
// set name // set name
spstr strCommand.txt,tEntity4.txt,",",5 spstr strCommand.txt,tEntity4.txt,",",19
vis tEntity4,1 vis tEntity4,1
} }
if(type4.txt=="shutter") if(type4.txt=="shutter")
@@ -2275,7 +2261,7 @@ Timer tmSerial
vis bText4,0 vis bText4,0
vis btOnOff4,1 vis btOnOff4,1
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",20
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0 btOnOff4.val=sys0
} }
@@ -2287,7 +2273,7 @@ Timer tmSerial
vis bText4,0 vis bText4,0
vis btOnOff4,1 vis btOnOff4,1
// get Button State (optional Value) // get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6 spstr strCommand.txt,tTmp.txt,",",20
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0 btOnOff4.val=sys0
} }
@@ -2302,7 +2288,7 @@ Timer tmSerial
bText4.pco=65535 bText4.pco=65535
bText4.pco2=65535 bText4.pco2=65535
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,",",6 spstr strCommand.txt,bText4.txt,",",20
} }
if(type4.txt=="button") if(type4.txt=="button")
{ {
@@ -2315,8 +2301,7 @@ Timer tmSerial
bText4.pco=1374 bText4.pco=1374
bText4.pco2=1374 bText4.pco2=1374
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,",",6 spstr strCommand.txt,bText4.txt,",",20
}
} }
} }
if(tInstruction.txt=="pageType") if(tInstruction.txt=="pageType")

View File

@@ -38,25 +38,25 @@ 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
screensaver
25 Component(s)
152 Line(s) of event code
118 Unique line(s) of event code
cardThermo cardThermo
42 Component(s) 42 Component(s)
450 Line(s) of event code 450 Line(s) of event code
220 Unique line(s) of event code 220 Unique line(s) of event code
cardEntities cardEntities
55 Component(s) 55 Component(s)
824 Line(s) of event code 811 Line(s) of event code
313 Unique line(s) of event code 312 Unique line(s) of event code
cardAlarm cardAlarm
28 Component(s) 28 Component(s)
159 Line(s) of event code 159 Line(s) of event code
105 Unique line(s) of event code 105 Unique line(s) of event code
screensaver
25 Component(s)
152 Line(s) of event code
118 Unique line(s) of event code
Total Total
13 Page(s) 13 Page(s)
302 Component(s) 302 Component(s)
2665 Line(s) of event code 2652 Line(s) of event code
684 Unique line(s) of event code 682 Unique line(s) of event code

View File

@@ -730,7 +730,7 @@ Timer tmSerial
//pagenumber //pagenumber
spstr strCommand.txt,tTmp.txt,"?",1 spstr strCommand.txt,tTmp.txt,"?",1
covx tTmp.txt,sys0,0,0 covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,nPage,sys0,1 nPage=sys0
//don't send current page number, wake will do //don't send current page number, wake will do
} }
if(tInstruction.txt=="pageType") if(tInstruction.txt=="pageType")