mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-01-06 06:35:48 +01:00
Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui
This commit is contained in:
@@ -48,3 +48,164 @@
|
||||
│ b[sys0].pco=defaultFontColor
|
||||
│ }
|
||||
│ if(b[sys0].type==53&&defaultBcoColor==0)
|
||||
├── screensaver.txt
|
||||
│ @@ -64,44 +64,14 @@
|
||||
│
|
||||
│ Variable (string) tSend
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 50
|
||||
│
|
||||
│ -Variable (int32) xc1
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) yc1
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) xc2
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) yc2
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) ycR
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) xcR
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ Text tTime
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Disable release event after dragging: 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard : none
|
||||
│ @@ -754,38 +724,21 @@
|
||||
│ {
|
||||
│ sleepValue=0
|
||||
│ dim=dimValue
|
||||
│ vaTap.val=0
|
||||
│ }
|
||||
│ }
|
||||
│
|
||||
│ -Timer tm0
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Period (ms): 50
|
||||
│ - Enabled : yes
|
||||
│ -
|
||||
│ - Events
|
||||
│ - Timer Event
|
||||
│ - if(tc0.val!=0)
|
||||
│ - {
|
||||
│ - xc2.val=tch0
|
||||
│ - yc2.val=tch1
|
||||
│ - }
|
||||
│ -
|
||||
│ TouchCap tc0
|
||||
│ Attributes
|
||||
│ Scope: local
|
||||
│ Value: 0
|
||||
│
|
||||
│ Events
|
||||
│ Touch Press Event
|
||||
│ - xc1.val=tch0
|
||||
│ - yc1.val=tch1
|
||||
│ - tm0.en=1
|
||||
│ if(tNotifyHead.txt!=""||tNotifyText.txt!="")
|
||||
│ {
|
||||
│ if(dim!=0)
|
||||
│ {
|
||||
│ tNotifyHead.txt=""
|
||||
│ tNotifyText.txt=""
|
||||
│ vis tNotifyHead,0
|
||||
│ @@ -793,75 +746,14 @@
|
||||
│ }
|
||||
│ }
|
||||
│ dim=dimValueNormal
|
||||
│ vaTap.val+=1
|
||||
│ covx vaTap.val,tTmp.txt,0,0
|
||||
│ tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
|
||||
│ //send calc crc
|
||||
│ - //btlen tSend.txt,sys0
|
||||
│ - //crcrest 1,0xffff // reset CRC
|
||||
│ - //crcputh 55 bb
|
||||
│ - //crcputs sys0,2
|
||||
│ - //crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - //printh 55 bb
|
||||
│ - //prints sys0,2
|
||||
│ - //prints tSend.txt,0
|
||||
│ - //prints crcval,2
|
||||
│ -
|
||||
│ - Touch Release Event
|
||||
│ - tm0.en=0
|
||||
│ - if(tch0==0)
|
||||
│ - // When this is zero we can interpret that as the real end of the drag event
|
||||
│ - {
|
||||
│ - xcR.val=xc1.val-xc2.val
|
||||
│ - ycR.val=yc1.val-yc2.val
|
||||
│ - // new method
|
||||
│ - // one of the difference values should be low to be a valid direction, in case it has a high value it's not a valid swipe, because it's diagonal
|
||||
│ - // x difference between -125 and 125 (swipe on y-axis)
|
||||
│ - if(xcR.val>-125&&xcR.val<125)
|
||||
│ - {
|
||||
│ - //tStatusNew.txt="x low, -> y"
|
||||
│ - // check if below minimum value (change is negative)
|
||||
│ - if(ycR.val<-80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="down"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeDown"
|
||||
│ - }else if(ycR.val>80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="up"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeUp"
|
||||
│ - }else
|
||||
│ - {
|
||||
│ - //tDirNew.txt="invalid"
|
||||
│ - }
|
||||
│ - // y difference between -125 and 125 (swipe on x-axis)
|
||||
│ - }else if(ycR.val>-125&&ycR.val<125)
|
||||
│ - {
|
||||
│ - //tStatusNew.txt="y low, -> x"
|
||||
│ - if(xcR.val<-80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="right"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeRight"
|
||||
│ - }else if(xcR.val>80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="left"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeLeft"
|
||||
│ - }else
|
||||
│ - {
|
||||
│ - //tDirNew.txt="invalid"
|
||||
│ - }
|
||||
│ - //diagonal swipe invalid
|
||||
│ - }else
|
||||
│ - {
|
||||
│ - //tStatusNew.txt="invalid"
|
||||
│ - //tDirNew.txt="diagonal"
|
||||
│ - }
|
||||
│ - }
|
||||
│ - //send calc crc
|
||||
│ btlen tSend.txt,sys0
|
||||
│ crcrest 1,0xffff // reset CRC
|
||||
│ crcputh 55 bb
|
||||
│ crcputs sys0,2
|
||||
│ crcputs tSend.txt,0
|
||||
│ //send cmd
|
||||
│ printh 55 bb
|
||||
|
||||
@@ -696,7 +696,44 @@
|
||||
│ }
|
||||
│ if(b[sys0].type==53&&defaultBcoColor==0)
|
||||
├── screensaver.txt
|
||||
│ @@ -71,15 +71,15 @@
|
||||
│ @@ -64,52 +64,22 @@
|
||||
│
|
||||
│ Variable (string) tSend
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 50
|
||||
│
|
||||
│ -Variable (int32) xc1
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) yc1
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) xc2
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) yc2
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) ycR
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ -Variable (int32) xcR
|
||||
│ - Attributes
|
||||
│ - Scope: local
|
||||
│ - Value: 0
|
||||
│ -
|
||||
│ Text tTime
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
@@ -713,3 +750,118 @@
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Disable release event after dragging: 0
|
||||
│ @@ -754,38 +724,21 @@
|
||||
│ {
|
||||
│ sleepValue=0
|
||||
│ dim=dimValue
|
||||
│ vaTap.val=0
|
||||
│ }
|
||||
│ }
|
||||
│
|
||||
│ -Timer tm0
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Period (ms): 50
|
||||
│ - Enabled : yes
|
||||
│ -
|
||||
│ - Events
|
||||
│ - Timer Event
|
||||
│ - if(tc0.val!=0)
|
||||
│ - {
|
||||
│ - xc2.val=tch0
|
||||
│ - yc2.val=tch1
|
||||
│ - }
|
||||
│ -
|
||||
│ TouchCap tc0
|
||||
│ Attributes
|
||||
│ Scope: local
|
||||
│ Value: 0
|
||||
│
|
||||
│ Events
|
||||
│ Touch Press Event
|
||||
│ - xc1.val=tch0
|
||||
│ - yc1.val=tch1
|
||||
│ - tm0.en=1
|
||||
│ if(tNotifyHead.txt!=""||tNotifyText.txt!="")
|
||||
│ {
|
||||
│ if(dim!=0)
|
||||
│ {
|
||||
│ tNotifyHead.txt=""
|
||||
│ tNotifyText.txt=""
|
||||
│ vis tNotifyHead,0
|
||||
│ @@ -793,75 +746,14 @@
|
||||
│ }
|
||||
│ }
|
||||
│ dim=dimValueNormal
|
||||
│ vaTap.val+=1
|
||||
│ covx vaTap.val,tTmp.txt,0,0
|
||||
│ tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
|
||||
│ //send calc crc
|
||||
│ - //btlen tSend.txt,sys0
|
||||
│ - //crcrest 1,0xffff // reset CRC
|
||||
│ - //crcputh 55 bb
|
||||
│ - //crcputs sys0,2
|
||||
│ - //crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - //printh 55 bb
|
||||
│ - //prints sys0,2
|
||||
│ - //prints tSend.txt,0
|
||||
│ - //prints crcval,2
|
||||
│ -
|
||||
│ - Touch Release Event
|
||||
│ - tm0.en=0
|
||||
│ - if(tch0==0)
|
||||
│ - // When this is zero we can interpret that as the real end of the drag event
|
||||
│ - {
|
||||
│ - xcR.val=xc1.val-xc2.val
|
||||
│ - ycR.val=yc1.val-yc2.val
|
||||
│ - // new method
|
||||
│ - // one of the difference values should be low to be a valid direction, in case it has a high value it's not a valid swipe, because it's diagonal
|
||||
│ - // x difference between -125 and 125 (swipe on y-axis)
|
||||
│ - if(xcR.val>-125&&xcR.val<125)
|
||||
│ - {
|
||||
│ - //tStatusNew.txt="x low, -> y"
|
||||
│ - // check if below minimum value (change is negative)
|
||||
│ - if(ycR.val<-80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="down"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeDown"
|
||||
│ - }else if(ycR.val>80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="up"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeUp"
|
||||
│ - }else
|
||||
│ - {
|
||||
│ - //tDirNew.txt="invalid"
|
||||
│ - }
|
||||
│ - // y difference between -125 and 125 (swipe on x-axis)
|
||||
│ - }else if(ycR.val>-125&&ycR.val<125)
|
||||
│ - {
|
||||
│ - //tStatusNew.txt="y low, -> x"
|
||||
│ - if(xcR.val<-80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="right"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeRight"
|
||||
│ - }else if(xcR.val>80)
|
||||
│ - {
|
||||
│ - //tDirNew.txt="left"
|
||||
│ - tSend.txt="event,buttonPress2,screensaver,swipeLeft"
|
||||
│ - }else
|
||||
│ - {
|
||||
│ - //tDirNew.txt="invalid"
|
||||
│ - }
|
||||
│ - //diagonal swipe invalid
|
||||
│ - }else
|
||||
│ - {
|
||||
│ - //tStatusNew.txt="invalid"
|
||||
│ - //tDirNew.txt="diagonal"
|
||||
│ - }
|
||||
│ - }
|
||||
│ - //send calc crc
|
||||
│ btlen tSend.txt,sys0
|
||||
│ crcrest 1,0xffff // reset CRC
|
||||
│ crcputh 55 bb
|
||||
│ crcputs sys0,2
|
||||
│ crcputs tSend.txt,0
|
||||
│ //send cmd
|
||||
│ printh 55 bb
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
+++ /dev/fd/62 2022-10-25 18:20:57.776626176 +0000
|
||||
+++ /dev/fd/62 2022-10-29 19:12:04.936656714 +0000
|
||||
+,14 +1329,45 @@
|
||||
+ page popupFan
|
||||
+ if(type4.txt=="input_sel")
|
||||
@@ -11,6 +11,11 @@
|
||||
+ if(type5.txt=="button"||type5.txt=="input_sel")
|
||||
+ tSend.txt+="mode-preset_modes,"+tTmp.txt
|
||||
+ tSend.txt+="mode-preset_modes,"+tTmp.txt
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,2
|
||||
+pupThermo.txt
|
||||
+5 +38,15 @@
|
||||
+ crcputs tSend.txt,0
|
||||
@@ -30,7 +35,44 @@
|
||||
+ }
|
||||
+ if(b[sys0].type==53&&defaultBcoColor==0)
|
||||
+reensaver.txt
|
||||
+5 +71,15 @@
|
||||
+2 +64,22 @@
|
||||
+
|
||||
+e (string) tSend
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 50
|
||||
+
|
||||
+e (int32) xc1
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+e (int32) yc1
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+e (int32) xc2
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+e (int32) yc2
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+e (int32) ycR
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+e (int32) xcR
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+ime
|
||||
+ributes
|
||||
+ Scope : local
|
||||
@@ -47,3 +89,113 @@
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+38 +724,21 @@
|
||||
+ {
|
||||
+ sleepValue=0
|
||||
+ dim=dimValue
|
||||
+ vaTap.val=0
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+m0
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Period (ms): 50
|
||||
+ Enabled : yes
|
||||
+
|
||||
+nts
|
||||
+ Timer Event
|
||||
+ if(tc0.val!=0)
|
||||
+ {
|
||||
+ xc2.val=tch0
|
||||
+ yc2.val=tch1
|
||||
+ }
|
||||
+
|
||||
+p tc0
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+nts
|
||||
+ Touch Press Event
|
||||
+ xc1.val=tch0
|
||||
+ yc1.val=tch1
|
||||
+ tm0.en=1
|
||||
+ if(tNotifyHead.txt!=""||tNotifyText.txt!="")
|
||||
+ {
|
||||
+ if(dim!=0)
|
||||
+ {
|
||||
+ tNotifyHead.txt=""
|
||||
+ tNotifyText.txt=""
|
||||
+ vis tNotifyHead,0
|
||||
+75 +746,14 @@
|
||||
+ }
|
||||
+ }
|
||||
+ dim=dimValueNormal
|
||||
+ vaTap.val+=1
|
||||
+ covx vaTap.val,tTmp.txt,0,0
|
||||
+ tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
|
||||
+ //send calc crc
|
||||
+ //btlen tSend.txt,sys0
|
||||
+ //crcrest 1,0xffff // reset CRC
|
||||
+ //crcputh 55 bb
|
||||
+ //crcputs sys0,2
|
||||
+ //crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ //printh 55 bb
|
||||
+ //prints sys0,2
|
||||
+ //prints tSend.txt,0
|
||||
+ //prints crcval,2
|
||||
+
|
||||
+ Touch Release Event
|
||||
+ tm0.en=0
|
||||
+ if(tch0==0)
|
||||
+ // When this is zero we can interpret that as the real end of the drag event
|
||||
+ {
|
||||
+ xcR.val=xc1.val-xc2.val
|
||||
+ ycR.val=yc1.val-yc2.val
|
||||
+ // new method
|
||||
+ // one of the difference values should be low to be a valid direction, in case it has a high value it's not a valid swipe, because it's diagonal
|
||||
+ // x difference between -125 and 125 (swipe on y-axis)
|
||||
+ if(xcR.val>-125&&xcR.val<125)
|
||||
+ {
|
||||
+ //tStatusNew.txt="x low, -> y"
|
||||
+ // check if below minimum value (change is negative)
|
||||
+ if(ycR.val<-80)
|
||||
+ {
|
||||
+ //tDirNew.txt="down"
|
||||
+ tSend.txt="event,buttonPress2,screensaver,swipeDown"
|
||||
+ }else if(ycR.val>80)
|
||||
+ {
|
||||
+ //tDirNew.txt="up"
|
||||
+ tSend.txt="event,buttonPress2,screensaver,swipeUp"
|
||||
+ }else
|
||||
+ {
|
||||
+ //tDirNew.txt="invalid"
|
||||
+ }
|
||||
+ // y difference between -125 and 125 (swipe on x-axis)
|
||||
+ }else if(ycR.val>-125&&ycR.val<125)
|
||||
+ {
|
||||
+ //tStatusNew.txt="y low, -> x"
|
||||
+ if(xcR.val<-80)
|
||||
+ {
|
||||
+ //tDirNew.txt="right"
|
||||
+ tSend.txt="event,buttonPress2,screensaver,swipeRight"
|
||||
+ }else if(xcR.val>80)
|
||||
+ {
|
||||
+ //tDirNew.txt="left"
|
||||
+ tSend.txt="event,buttonPress2,screensaver,swipeLeft"
|
||||
+ }else
|
||||
+ {
|
||||
+ //tDirNew.txt="invalid"
|
||||
+ }
|
||||
+ //diagonal swipe invalid
|
||||
+ }else
|
||||
+ {
|
||||
+ //tStatusNew.txt="invalid"
|
||||
+ //tDirNew.txt="diagonal"
|
||||
+ }
|
||||
+ }
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
|
||||
Reference in New Issue
Block a user