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

This commit is contained in:
joBr99
2023-04-25 23:39:59 +02:00
11 changed files with 398 additions and 275 deletions

View File

@@ -1302,7 +1302,46 @@
│ tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
│ covx btOnOff1.val,tTmp.txt,0,0
│ tSend.txt+=tTmp.txt
│ @@ -401,63 +473,48 @@
│ @@ -345,38 +417,14 @@
│ Period (ms): 100
│ Enabled : no
│ Events
│ Timer Event
│ tmCooldown.en=0
│ -Timer tmDrawCooldown
│ - Attributes
│ - Scope : local
│ - Period (ms): 500
│ - Enabled : no
│ -
│ - Events
│ - Timer Event
│ - //draw black background
│ - fill hBrightness.x,hBrightness.y,100,hBrightness.val*-25/10+250,8484
│ - //draw draw colored bar at the position of the current brightness value
│ - fill hBrightness.x,hBrightness.val*-25/10+314,100,hBrightness.val*25/10,col.val
│ - if(hBrightness.val>7)
│ - {
│ - //draw cursor
│ - fill hBrightness.x+25,hBrightness.val*-25/10+322,50,4,WHITE
│ - //paint corner
│ - xstr hBrightness.x,hBrightness.val*-25/10+314,100,hBrightness.h,7,8484,0,0,0,3,"a"
│ - }
│ - //paint corners
│ - xstr hBrightness.x,hBrightness.y,100,hBrightness.h,7,defaultBcoColor,0,0,0,3,"a"
│ - xstr hBrightness.x,hBrightness.y+hBrightness.h-15,100,hBrightness.h,7,defaultBcoColor,0,0,0,3,"b"
│ - tmDrawCooldown.en=0
│ -
│ Timer tmSerial
│ Attributes
│ Scope : local
│ Period (ms): 50
│ Enabled : yes
│ Events
│ @@ -425,48 +473,48 @@
│ // 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,tTmp.txt,"~",1
@@ -1339,25 +1378,13 @@
│ + vis t2,1
│ vis hBrightness,1
│ covx tTmp.txt,sys0,0,0
│ - if(tmCooldown.en==0&&hBrightness.val!=sys0)
│ - hBrightness.val=sys0
│ - tmDrawCooldown.en=1
│ - tmDrawCooldown.tim=500
│ + if(tmCooldown.en==0)
{
hBrightness.val=sys0
- //draw black background
│ - fill hBrightness.x,hBrightness.y,100,hBrightness.val*-25/10+250,8484
│ - //draw draw colored bar at the position of the current brightness value
│ - fill hBrightness.x,hBrightness.val*-25/10+314,100,hBrightness.val*25/10,col.val
│ - if(hBrightness.val>7)
│ - {
│ - //draw cursor
│ - fill hBrightness.x+25,hBrightness.val*-25/10+322,50,4,WHITE
│ - //paint corner
│ - xstr hBrightness.x,hBrightness.val*-25/10+314,100,hBrightness.h,7,8484,0,0,0,3,"a"
│ - }
│ - //paint corners
│ - xstr hBrightness.x,hBrightness.y,100,hBrightness.h,7,defaultBcoColor,0,0,0,3,"a"
│ - xstr hBrightness.x,hBrightness.y+hBrightness.h-15,100,hBrightness.h,7,defaultBcoColor,0,0,0,3,"b"
│ }
+ {
+ hBrightness.val=sys0
+ }
│ }
│ // get ColorTemp value
│ spstr strCommand.txt,tTmp.txt,"~",6
@@ -1375,7 +1402,7 @@
│ // switch mode
│ click bColor,1
│ click bColor,0
│ @@ -472,16 +529,16 @@
│ @@ -481,16 +529,16 @@
│ click bColor,1
│ click bColor,0
│ }
@@ -1394,7 +1421,7 @@
│ }
│ // mode == 0 is rgb controls currently shown
│ if(mode.val==0)
│ @@ -492,36 +549,36 @@
│ @@ -501,36 +549,36 @@
│ }
│ }
│ // get Color value