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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user