Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text)

This commit is contained in:
joBr99
2022-10-29 19:24:15 +00:00
committed by github-actions[bot]
parent 0ea7dca932
commit 955b46297d
13 changed files with 561 additions and 499 deletions

View File

@@ -30,26 +30,9 @@
│ crcputs sys0,2 │ crcputs sys0,2
│ crcputs tSend.txt,0 │ crcputs tSend.txt,0
│ //send cmd │ //send cmd
├── popupThermo.txt
│ @@ -38,15 +38,15 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
│ prints sys0,2
│ prints tSend.txt,0
│ prints crcval,2
│ popupThermo.bco=defaultBcoColor
│ - for(sys0=0;sys0<43;sys0++)
│ + for(sys0=0;sys0<24;sys0++)
│ {
│ if(b[sys0].type==98||b[sys0].type==116)
│ {
│ b[sys0].bco=defaultBcoColor
│ b[sys0].pco=defaultFontColor
│ }
│ if(b[sys0].type==53&&defaultBcoColor==0)
├── screensaver.txt ├── screensaver.txt
@@ -64,44 +64,14 @@ ┄ ordering differences only
│ @@ -64,40 +64,40 @@
│ Variable (string) tSend │ Variable (string) tSend
│ Attributes │ Attributes
@@ -58,154 +41,41 @@
│ Max. Text Size: 50 │ Max. Text Size: 50
│ -Variable (int32) xc1 │ -Variable (int32) xc1
- Attributes +Variable (int32) xcR
│ - 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 │ Attributes
│ Scope: local │ Scope: local
│ Value: 0 │ Value: 0
Events -Variable (int32) yc1
Touch Press Event +Variable (int32) ycR
- xc1.val=tch0 Attributes
- yc1.val=tch1 Scope: local
- tm0.en=1 Value: 0
if(tNotifyHead.txt!=""||tNotifyText.txt!="")
{ -Variable (int32) xc2
if(dim!=0) +Variable (int32) yc2
{ Attributes
tNotifyHead.txt="" Scope: local
tNotifyText.txt="" Value: 0
vis tNotifyHead,0
@@ -793,75 +746,14 @@ -Variable (int32) yc2
} +Variable (int32) xc2
} Attributes
dim=dimValueNormal Scope: local
vaTap.val+=1 Value: 0
covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt -Variable (int32) ycR
//send calc crc +Variable (int32) yc1
- //btlen tSend.txt,sys0 Attributes
- //crcrest 1,0xffff // reset CRC Scope: local
- //crcputh 55 bb Value: 0
- //crcputs sys0,2
│ - //crcputs tSend.txt,0 │ -Variable (int32) xcR
- //send cmd +Variable (int32) xc1
- //printh 55 bb Attributes
- //prints sys0,2 Scope: local
- //prints tSend.txt,0 Value: 0
- //prints crcval,2
- Text tTime
- Touch Release Event Attributes
- tm0.en=0 Scope : local
│ - 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

View File

@@ -34,10 +34,10 @@ pageTest
14 Component(s) 14 Component(s)
14 Line(s) of event code 14 Line(s) of event code
14 Unique line(s) of event code 14 Unique line(s) of event code
popupThermo screensaver
44 Component(s) 45 Component(s)
515 Line(s) of event code 389 Line(s) of event code
272 Unique line(s) of event code 288 Unique line(s) of event code
cardGrid cardGrid
42 Component(s) 42 Component(s)
478 Line(s) of event code 478 Line(s) of event code
@@ -46,10 +46,6 @@ cardAlarm
40 Component(s) 40 Component(s)
427 Line(s) of event code 427 Line(s) of event code
258 Unique line(s) of event code 258 Unique line(s) of event code
screensaver
38 Component(s)
350 Line(s) of event code
266 Unique line(s) of event code
popupInSel popupInSel
34 Component(s) 34 Component(s)
529 Line(s) of event code 529 Line(s) of event code
@@ -62,6 +58,10 @@ cardPower
43 Component(s) 43 Component(s)
423 Line(s) of event code 423 Line(s) of event code
293 Unique line(s) of event code 293 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
cardThermo cardThermo
53 Component(s) 53 Component(s)
596 Line(s) of event code 596 Line(s) of event code
@@ -73,6 +73,6 @@ cardEntities
Total Total
17 Page(s) 17 Page(s)
563 Component(s) 570 Component(s)
6856 Line(s) of event code 6895 Line(s) of event code
1772 Unique line(s) of event code 1794 Unique line(s) of event code

View File

@@ -50,7 +50,7 @@ Page popupThermo
prints tSend.txt,0 prints tSend.txt,0
prints crcval,2 prints crcval,2
popupThermo.bco=defaultBcoColor popupThermo.bco=defaultBcoColor
for(sys0=0;sys0<24;sys0++) for(sys0=0;sys0<43;sys0++)
{ {
if(b[sys0].type==98||b[sys0].type==116) if(b[sys0].type==98||b[sys0].type==116)
{ {

View File

@@ -82,6 +82,42 @@ Variable (string) tSend
Text : Text :
Max. Text Size: 50 Max. Text Size: 50
Variable (int32) xcR
Attributes
ID : 38
Scope: local
Value: 0
Variable (int32) ycR
Attributes
ID : 39
Scope: local
Value: 0
Variable (int32) yc2
Attributes
ID : 40
Scope: local
Value: 0
Variable (int32) xc2
Attributes
ID : 41
Scope: local
Value: 0
Variable (int32) yc1
Attributes
ID : 42
Scope: local
Value: 0
Variable (int32) xc1
Attributes
ID : 43
Scope: local
Value: 0
Text tTime Text tTime
Attributes Attributes
ID : 5 ID : 5
@@ -1294,6 +1330,21 @@ Timer tmSleep
} }
} }
Timer tm0
Attributes
ID : 44
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
if(tc0.val!=0)
{
xc2.val=tch0
yc2.val=tch1
}
TouchCap tc0 TouchCap tc0
Attributes Attributes
ID : 2 ID : 2
@@ -1302,6 +1353,9 @@ TouchCap tc0
Events Events
Touch Press Event Touch Press Event
xc1.val=tch0
yc1.val=tch1
tm0.en=1
if(tNotifyHead.txt!=""||tNotifyText.txt!="") if(tNotifyHead.txt!=""||tNotifyText.txt!="")
{ {
if(dim!=0) if(dim!=0)
@@ -1317,6 +1371,67 @@ TouchCap tc0
covx vaTap.val,tTmp.txt,0,0 covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc //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 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
crcputh 55 bb crcputh 55 bb

View File

@@ -42,7 +42,7 @@ Page popupThermo
prints tSend.txt,0 prints tSend.txt,0
prints crcval,2 prints crcval,2
popupThermo.bco=defaultBcoColor popupThermo.bco=defaultBcoColor
for(sys0=0;sys0<24;sys0++) for(sys0=0;sys0<43;sys0++)
{ {
if(b[sys0].type==98||b[sys0].type==116) if(b[sys0].type==98||b[sys0].type==116)
{ {

View File

@@ -68,6 +68,36 @@ Variable (string) tSend
Text : Text :
Max. Text Size: 50 Max. Text Size: 50
Variable (int32) xcR
Attributes
Scope: local
Value: 0
Variable (int32) ycR
Attributes
Scope: local
Value: 0
Variable (int32) yc2
Attributes
Scope: local
Value: 0
Variable (int32) xc2
Attributes
Scope: local
Value: 0
Variable (int32) yc1
Attributes
Scope: local
Value: 0
Variable (int32) xc1
Attributes
Scope: local
Value: 0
Text tTime Text tTime
Attributes Attributes
Scope : local Scope : local
@@ -728,6 +758,20 @@ Timer tmSleep
} }
} }
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 TouchCap tc0
Attributes Attributes
Scope: local Scope: local
@@ -735,6 +779,9 @@ TouchCap tc0
Events Events
Touch Press Event Touch Press Event
xc1.val=tch0
yc1.val=tch1
tm0.en=1
if(tNotifyHead.txt!=""||tNotifyText.txt!="") if(tNotifyHead.txt!=""||tNotifyText.txt!="")
{ {
if(dim!=0) if(dim!=0)
@@ -750,6 +797,67 @@ TouchCap tc0
covx vaTap.val,tTmp.txt,0,0 covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc //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 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
crcputh 55 bb crcputh 55 bb

View File

@@ -677,26 +677,8 @@
│ crcrest 1,0xffff // reset CRC │ crcrest 1,0xffff // reset CRC
│ crcputh 55 bb │ crcputh 55 bb
│ crcputs sys0,2 │ crcputs sys0,2
├── popupThermo.txt
│ @@ -38,15 +38,15 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
│ prints sys0,2
│ prints tSend.txt,0
│ prints crcval,2
│ popupThermo.bco=defaultBcoColor
│ - for(sys0=0;sys0<43;sys0++)
│ + for(sys0=0;sys0<24;sys0++)
│ {
│ if(b[sys0].type==98||b[sys0].type==116)
│ {
│ b[sys0].bco=defaultBcoColor
│ b[sys0].pco=defaultFontColor
│ }
│ if(b[sys0].type==53&&defaultBcoColor==0)
├── screensaver.txt ├── screensaver.txt
│ @@ -64,52 +64,22 @@ │ @@ -64,52 +64,52 @@
│ Variable (string) tSend │ Variable (string) tSend
│ Attributes │ Attributes
@@ -705,35 +687,41 @@
│ Max. Text Size: 50 │ Max. Text Size: 50
│ -Variable (int32) xc1 │ -Variable (int32) xc1
- Attributes +Variable (int32) xcR
- Scope: local Attributes
- Value: 0 Scope: local
- Value: 0
│ -Variable (int32) yc1 │ -Variable (int32) yc1
- Attributes +Variable (int32) ycR
- Scope: local Attributes
- Value: 0 Scope: local
- Value: 0
│ -Variable (int32) xc2 │ -Variable (int32) xc2
- Attributes +Variable (int32) yc2
- Scope: local Attributes
- Value: 0 Scope: local
- Value: 0
│ -Variable (int32) yc2 │ -Variable (int32) yc2
- Attributes +Variable (int32) xc2
- Scope: local Attributes
- Value: 0 Scope: local
- Value: 0
│ -Variable (int32) ycR │ -Variable (int32) ycR
- Attributes +Variable (int32) yc1
- Scope: local Attributes
- Value: 0 Scope: local
- Value: 0
│ -Variable (int32) xcR │ -Variable (int32) xcR
- Attributes +Variable (int32) xc1
- Scope: local Attributes
- Value: 0 Scope: local
- Value: 0
│ Text tTime │ Text tTime
│ Attributes │ Attributes
│ Scope : local │ Scope : local
@@ -750,118 +738,3 @@
│ Scope : local │ Scope : local
│ Dragging : 0 │ Dragging : 0
│ Disable release event after 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

View File

@@ -1,4 +1,4 @@
+++ /dev/fd/62 2022-10-29 19:12:04.936656714 +0000 +++ /dev/fd/62 2022-10-29 19:24:09.722332182 +0000
+,14 +1329,45 @@ +,14 +1329,45 @@
+ page popupFan + page popupFan
+ if(type4.txt=="input_sel") + if(type4.txt=="input_sel")
@@ -11,31 +11,8 @@
+ if(type5.txt=="button"||type5.txt=="input_sel") + if(type5.txt=="button"||type5.txt=="input_sel")
+ tSend.txt+="mode-preset_modes,"+tTmp.txt + tSend.txt+="mode-preset_modes,"+tTmp.txt
+ 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
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+ popupThermo.bco=defaultBcoColor
+ for(sys0=0;sys0<43;sys0++)
+ for(sys0=0;sys0<24;sys0++)
+ {
+ if(b[sys0].type==98||b[sys0].type==116)
+ {
+ b[sys0].bco=defaultBcoColor
+ b[sys0].pco=defaultFontColor
+ }
+ if(b[sys0].type==53&&defaultBcoColor==0)
+reensaver.txt +reensaver.txt
+2 +64,22 @@ +2 +64,52 @@
+ +
+e (string) tSend +e (string) tSend
+ributes +ributes
@@ -44,31 +21,37 @@
+ Max. Text Size: 50 + Max. Text Size: 50
+ +
+e (int32) xc1 +e (int32) xc1
+e (int32) xcR
+ributes +ributes
+ Scope: local + Scope: local
+ Value: 0 + Value: 0
+ +
+e (int32) yc1 +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 +e (int32) ycR
+ributes +ributes
+ Scope: local + Scope: local
+ Value: 0 + Value: 0
+ +
+e (int32) xc2
+e (int32) yc2
+ributes
+ Scope: local
+ Value: 0
+
+e (int32) yc2
+e (int32) xc2
+ributes
+ Scope: local
+ Value: 0
+
+e (int32) ycR
+e (int32) yc1
+ributes
+ Scope: local
+ Value: 0
+
+e (int32) xcR +e (int32) xcR
+e (int32) xc1
+ributes +ributes
+ Scope: local + Scope: local
+ Value: 0 + Value: 0
@@ -89,113 +72,3 @@
+ Scope : local + Scope : local
+ Dragging : 0 + Dragging : 0
+ Disable release event after 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

View File

@@ -26,6 +26,10 @@ pageStartup
19 Component(s) 19 Component(s)
172 Line(s) of event code 172 Line(s) of event code
125 Unique line(s) of event code 125 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
cardQR cardQR
32 Component(s) 32 Component(s)
409 Line(s) of event code 409 Line(s) of event code
@@ -38,10 +42,6 @@ cardMedia
34 Component(s) 34 Component(s)
394 Line(s) of event code 394 Line(s) of event code
213 Unique line(s) of event code 213 Unique line(s) of event code
screensaver
38 Component(s)
350 Line(s) of event code
266 Unique line(s) of event code
popupFan popupFan
27 Component(s) 27 Component(s)
347 Line(s) of event code 347 Line(s) of event code
@@ -62,10 +62,10 @@ popupInSel
34 Component(s) 34 Component(s)
529 Line(s) of event code 529 Line(s) of event code
257 Unique line(s) of event code 257 Unique line(s) of event code
popupThermo screensaver
44 Component(s) 45 Component(s)
515 Line(s) of event code 389 Line(s) of event code
272 Unique line(s) of event code 288 Unique line(s) of event code
cardEntities cardEntities
77 Component(s) 77 Component(s)
1379 Line(s) of event code 1379 Line(s) of event code
@@ -73,6 +73,6 @@ cardEntities
Total Total
17 Page(s) 17 Page(s)
575 Component(s) 582 Component(s)
7083 Line(s) of event code 7122 Line(s) of event code
1847 Unique line(s) of event code 1869 Unique line(s) of event code

View File

@@ -50,7 +50,7 @@ Page popupThermo
prints tSend.txt,0 prints tSend.txt,0
prints crcval,2 prints crcval,2
popupThermo.bco=defaultBcoColor popupThermo.bco=defaultBcoColor
for(sys0=0;sys0<24;sys0++) for(sys0=0;sys0<43;sys0++)
{ {
if(b[sys0].type==98||b[sys0].type==116) if(b[sys0].type==98||b[sys0].type==116)
{ {

View File

@@ -82,6 +82,42 @@ Variable (string) tSend
Text : Text :
Max. Text Size: 50 Max. Text Size: 50
Variable (int32) xcR
Attributes
ID : 38
Scope: local
Value: 0
Variable (int32) ycR
Attributes
ID : 39
Scope: local
Value: 0
Variable (int32) yc2
Attributes
ID : 40
Scope: local
Value: 0
Variable (int32) xc2
Attributes
ID : 41
Scope: local
Value: 0
Variable (int32) yc1
Attributes
ID : 42
Scope: local
Value: 0
Variable (int32) xc1
Attributes
ID : 43
Scope: local
Value: 0
Text tTime Text tTime
Attributes Attributes
ID : 5 ID : 5
@@ -1294,6 +1330,21 @@ Timer tmSleep
} }
} }
Timer tm0
Attributes
ID : 44
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
if(tc0.val!=0)
{
xc2.val=tch0
yc2.val=tch1
}
TouchCap tc0 TouchCap tc0
Attributes Attributes
ID : 2 ID : 2
@@ -1302,6 +1353,9 @@ TouchCap tc0
Events Events
Touch Press Event Touch Press Event
xc1.val=tch0
yc1.val=tch1
tm0.en=1
if(tNotifyHead.txt!=""||tNotifyText.txt!="") if(tNotifyHead.txt!=""||tNotifyText.txt!="")
{ {
if(dim!=0) if(dim!=0)
@@ -1317,6 +1371,67 @@ TouchCap tc0
covx vaTap.val,tTmp.txt,0,0 covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc //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 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
crcputh 55 bb crcputh 55 bb

View File

@@ -42,7 +42,7 @@ Page popupThermo
prints tSend.txt,0 prints tSend.txt,0
prints crcval,2 prints crcval,2
popupThermo.bco=defaultBcoColor popupThermo.bco=defaultBcoColor
for(sys0=0;sys0<24;sys0++) for(sys0=0;sys0<43;sys0++)
{ {
if(b[sys0].type==98||b[sys0].type==116) if(b[sys0].type==98||b[sys0].type==116)
{ {

View File

@@ -68,6 +68,36 @@ Variable (string) tSend
Text : Text :
Max. Text Size: 50 Max. Text Size: 50
Variable (int32) xcR
Attributes
Scope: local
Value: 0
Variable (int32) ycR
Attributes
Scope: local
Value: 0
Variable (int32) yc2
Attributes
Scope: local
Value: 0
Variable (int32) xc2
Attributes
Scope: local
Value: 0
Variable (int32) yc1
Attributes
Scope: local
Value: 0
Variable (int32) xc1
Attributes
Scope: local
Value: 0
Text tTime Text tTime
Attributes Attributes
Scope : local Scope : local
@@ -728,6 +758,20 @@ Timer tmSleep
} }
} }
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 TouchCap tc0
Attributes Attributes
Scope: local Scope: local
@@ -735,6 +779,9 @@ TouchCap tc0
Events Events
Touch Press Event Touch Press Event
xc1.val=tch0
yc1.val=tch1
tm0.en=1
if(tNotifyHead.txt!=""||tNotifyText.txt!="") if(tNotifyHead.txt!=""||tNotifyText.txt!="")
{ {
if(dim!=0) if(dim!=0)
@@ -750,6 +797,67 @@ TouchCap tc0
covx vaTap.val,tTmp.txt,0,0 covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc //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 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
crcputh 55 bb crcputh 55 bb