Simplify touchevent engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".
This commit is contained in:
Edward Firmo
2023-09-11 12:17:10 +02:00
parent f1e3dc49e6
commit 7452dfd2bb
89 changed files with 581 additions and 496 deletions

View File

@@ -11,7 +11,7 @@ Program.s
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape
bauds=115200//Configure baudrate
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
//randset 0,65535//used for touchevent sensor
randset 0,65535//used for touchevent sensor
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
if(display_mode==1)
{

View File

@@ -33,21 +33,17 @@ Page alarm
}
Touch Press Event
lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints lastclick.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints lastclick.txt,0
printh 00
prints rand,0
printh FF FF FF
Variable (string) lastclick

View File

@@ -23,6 +23,20 @@ Page boot
printh 00
printh FF FF FF
Touch Press Event
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Variable (int32) counter
Attributes
ID : 12

View File

@@ -30,19 +30,17 @@ Page buttonpage01
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Variable (string) lastclick

View File

@@ -30,19 +30,17 @@ Page buttonpage02
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Variable (string) lastclick

View File

@@ -30,19 +30,17 @@ Page buttonpage03
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Variable (string) lastclick

View File

@@ -30,19 +30,17 @@ Page buttonpage04
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Variable (string) lastclick

View File

@@ -40,21 +40,17 @@ Page climate
}
Touch Press Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints climatesetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints climatesetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Page Exit Event

View File

@@ -27,19 +27,17 @@ Page confirm
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "confirm",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "confirm",0
printh 00
prints rand,0
printh FF FF FF
Variable (int32) page_id

View File

@@ -28,21 +28,17 @@ Page cover
}
Touch Press Event
coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints coversetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints coversetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Variable (string) va1

View File

@@ -27,19 +27,17 @@ Page entitypage01
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text value01_label

View File

@@ -27,19 +27,17 @@ Page entitypage02
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text value01_label

View File

@@ -27,19 +27,17 @@ Page entitypage03
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text value01_label

View File

@@ -27,19 +27,17 @@ Page entitypage04
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text value01_label

View File

@@ -28,21 +28,17 @@ Page fan
}
Touch Press Event
fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints fansetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints fansetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Variable (string) fansetting
@@ -135,6 +131,11 @@ Slider fanslider
button_up.pco=10597
}
timer0.en=1
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button button_up
Attributes

View File

@@ -31,6 +31,20 @@ Page home
vis right_bt_text,0
}
Touch Press Event
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Variable (int32) disdim
Attributes
ID : 2

View File

@@ -28,21 +28,17 @@ Page keyb_num
}
Touch Press Event
aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints aux.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints aux.txt,0
printh 00
prints rand,0
printh FF FF FF
Variable (int32) page_id
@@ -129,6 +125,11 @@ Button b1
Events
Touch Release Event
pin.txt+=b1.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button bclose
Attributes
@@ -157,6 +158,11 @@ Button b2
Events
Touch Release Event
pin.txt+=b2.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b3
Attributes
@@ -171,6 +177,11 @@ Button b3
Events
Touch Release Event
pin.txt+=b3.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b4
Attributes
@@ -185,6 +196,11 @@ Button b4
Events
Touch Release Event
pin.txt+=b4.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b5
Attributes
@@ -199,6 +215,11 @@ Button b5
Events
Touch Release Event
pin.txt+=b5.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b6
Attributes
@@ -213,6 +234,11 @@ Button b6
Events
Touch Release Event
pin.txt+=b6.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b7
Attributes
@@ -227,6 +253,11 @@ Button b7
Events
Touch Release Event
pin.txt+=b7.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b8
Attributes
@@ -241,6 +272,11 @@ Button b8
Events
Touch Release Event
pin.txt+=b8.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b9
Attributes
@@ -255,6 +291,11 @@ Button b9
Events
Touch Release Event
pin.txt+=b9.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button bclear
Attributes
@@ -269,6 +310,11 @@ Button bclear
Events
Touch Release Event
pin.txt=""
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button b0
Attributes
@@ -283,6 +329,11 @@ Button b0
Events
Touch Release Event
pin.txt+=b0.txt
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button benter
Attributes

View File

@@ -46,21 +46,17 @@ Page light
}
Touch Press Event
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints lightsetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints lightsetting.txt,0
printh 00
prints rand,0
printh FF FF FF
Variable (int32) rgb565

View File

@@ -28,21 +28,17 @@ Page media_player
}
Touch Press Event
lastclick.txt="{\"page\": \"media_player\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints lastclick.txt,0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
lastclick.txt="{\"page\": \"media_player\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
printh 92
printh 91
prints "touchevent",0
printh 00
prints lastclick.txt,0
printh 00
prints rand,0
printh FF FF FF
Variable (string) back_page
@@ -314,6 +310,14 @@ Slider vol_slider
Upper range limit: 100
Lower range limit: 0
Events
Touch Release Event
printh 91
prints "touchevent",0
printh 00
prints rand,0
printh FF FF FF
Button button_back
Attributes
ID : 5

View File

@@ -27,19 +27,17 @@ Page notification
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Variable (string) lastclick

View File

@@ -21,19 +21,17 @@ Page qrcode
printh FF FF FF
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text qrcode_label

View File

@@ -25,19 +25,17 @@ Page settings
printh FF FF FF
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text bright_text

View File

@@ -31,7 +31,6 @@ Page weather01
prints "touchevent",0
printh 00
prints rand,0
printh 00
printh FF FF FF
Touch Release Event
@@ -39,7 +38,6 @@ Page weather01
prints "touchevent",0
printh 00
prints rand,0
printh 00
printh FF FF FF
Text day

View File

@@ -27,19 +27,17 @@ Page weather02
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text day

View File

@@ -27,19 +27,17 @@ Page weather03
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text day

View File

@@ -27,19 +27,17 @@ Page weather04
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text day

View File

@@ -27,19 +27,17 @@ Page weather05
}
Touch Press Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
prints rand,0
printh FF FF FF
Touch Release Event
printh 92
printh 91
prints "touchevent",0
printh 00
prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"release\"}",0
printh 00
prints rand,0
printh FF FF FF
Text day