937 lines
24 KiB
Plaintext
937 lines
24 KiB
Plaintext
Page climate
|
|
Attributes
|
|
ID : 0
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Locked : no
|
|
Swide up page ID : disabled
|
|
Swide down page ID : disabled
|
|
Swide left page ID : disabled
|
|
Swide right page ID: disabled
|
|
|
|
Events
|
|
Preinitialize Event
|
|
if(api==1||embedded.val==1)
|
|
{
|
|
printh 92
|
|
prints "currentpage",0
|
|
printh 00
|
|
prints "climate",0
|
|
printh 00
|
|
printh FF FF FF
|
|
vis target_icon,0
|
|
vis target_temp,0
|
|
vis current_temp,0
|
|
vis current_icon,0
|
|
vis climateslider,0
|
|
vis button01,0
|
|
vis button02,0
|
|
vis button03,0
|
|
vis button04,0
|
|
vis button05,0
|
|
vis button06,0
|
|
vis button07,0
|
|
}else
|
|
{
|
|
page home
|
|
}
|
|
|
|
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
|
|
|
|
Page Exit Event
|
|
if(timer01.en==1)
|
|
{
|
|
timer01.en=0
|
|
covx temp_number.val,va1.txt,0,0
|
|
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+"}"
|
|
printh 92
|
|
prints "nspanelevent",0
|
|
printh 00
|
|
prints climatesetting.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Variable (string) va1
|
|
Attributes
|
|
ID : 25
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 10
|
|
|
|
Variable (string) climatesetting
|
|
Attributes
|
|
ID : 26
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 255
|
|
|
|
Variable (string) lastclick
|
|
Attributes
|
|
ID : 34
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 255
|
|
|
|
Variable (int32) temp_offset
|
|
Attributes
|
|
ID : 36
|
|
Scope: local
|
|
Value: 0
|
|
|
|
Variable (int32) temp_step
|
|
Attributes
|
|
ID : 37
|
|
Scope: local
|
|
Value: 0
|
|
|
|
Variable (int32) temp_number
|
|
Attributes
|
|
ID : 43
|
|
Scope: local
|
|
Value: 0
|
|
|
|
Variable (int32) va0
|
|
Attributes
|
|
ID : 44
|
|
Scope: local
|
|
Value: 0
|
|
|
|
Variable (string) back_page
|
|
Attributes
|
|
ID : 45
|
|
Scope : local
|
|
Text : home
|
|
Max. Text Size: 15
|
|
|
|
Variable (int32) embedded
|
|
Attributes
|
|
ID : 46
|
|
Scope: global
|
|
Value: 0
|
|
|
|
Variable (string) va2
|
|
Attributes
|
|
ID : 47
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 10
|
|
|
|
Variable (string) click_comp
|
|
Attributes
|
|
ID : 49
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 8
|
|
|
|
Text current_temp
|
|
Attributes
|
|
ID : 3
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text page_label
|
|
Attributes
|
|
ID : 6
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 100
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text current_icon
|
|
Attributes
|
|
ID : 8
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text target_icon
|
|
Attributes
|
|
ID : 9
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value01_icon
|
|
Attributes
|
|
ID : 10
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value01
|
|
Attributes
|
|
ID : 11
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 6
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value02_icon
|
|
Attributes
|
|
ID : 12
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value02
|
|
Attributes
|
|
ID : 13
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 6
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value03_icon
|
|
Attributes
|
|
ID : 14
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value03
|
|
Attributes
|
|
ID : 15
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 6
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value04_icon
|
|
Attributes
|
|
ID : 16
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text value04
|
|
Attributes
|
|
ID : 17
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 6
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Text button01_icon
|
|
Attributes
|
|
ID : 18
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button02_icon
|
|
Attributes
|
|
ID : 19
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button03_icon
|
|
Attributes
|
|
ID : 20
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button04_icon
|
|
Attributes
|
|
ID : 21
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button05_icon
|
|
Attributes
|
|
ID : 22
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button06_icon
|
|
Attributes
|
|
ID : 23
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button07_icon
|
|
Attributes
|
|
ID : 24
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button08_icon
|
|
Attributes
|
|
ID : 38
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text button09_icon
|
|
Attributes
|
|
ID : 40
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Text target_temp
|
|
Attributes
|
|
ID : 42
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : disabled
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 10
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Slider climateslider
|
|
Attributes
|
|
ID : 7
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
Position : 20
|
|
Upper range limit: 40
|
|
Lower range limit: 0
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
temp_number.val=climateslider.val*temp_step.val
|
|
temp_number.val+=temp_offset.val
|
|
va0.val=temp_number.val/10
|
|
covx va0.val,target_temp.txt,0,0
|
|
va0.val=temp_number.val%10
|
|
covx va0.val,va1.txt,0,0
|
|
target_temp.txt+="."+va1.txt
|
|
timer01.en=1
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Button button_back
|
|
Attributes
|
|
ID : 48
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
State : unpressed
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
if(back_page.txt=="buttonpage01")
|
|
{
|
|
page buttonpage01
|
|
}else if(back_page.txt=="buttonpage02")
|
|
{
|
|
page buttonpage02
|
|
}else if(back_page.txt=="buttonpage03")
|
|
{
|
|
page buttonpage03
|
|
}else if(back_page.txt=="buttonpage04")
|
|
{
|
|
page buttonpage04
|
|
}else
|
|
{
|
|
page home
|
|
}
|
|
|
|
Hotspot decrease_temp
|
|
Attributes
|
|
ID : 4
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
if(climateslider.val>0)
|
|
{
|
|
climateslider.val--
|
|
temp_number.val=climateslider.val*temp_step.val
|
|
temp_number.val+=temp_offset.val
|
|
va0.val=temp_number.val/10
|
|
covx va0.val,target_temp.txt,0,0
|
|
va0.val=temp_number.val%10
|
|
covx va0.val,va1.txt,0,0
|
|
target_temp.txt+="."+va1.txt
|
|
}
|
|
|
|
Touch Release Event
|
|
timer01.en=1
|
|
|
|
Hotspot increase_temp
|
|
Attributes
|
|
ID : 5
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
if(climateslider.val<climateslider.maxval)
|
|
{
|
|
climateslider.val++
|
|
temp_number.val=climateslider.val*temp_step.val
|
|
temp_number.val+=temp_offset.val
|
|
va0.val=temp_number.val/10
|
|
covx va0.val,target_temp.txt,0,0
|
|
va0.val=temp_number.val%10
|
|
covx va0.val,va1.txt,0,0
|
|
target_temp.txt+="."+va1.txt
|
|
}
|
|
|
|
Touch Release Event
|
|
timer01.en=1
|
|
|
|
Hotspot button01
|
|
Attributes
|
|
ID : 27
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button02
|
|
Attributes
|
|
ID : 28
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button03
|
|
Attributes
|
|
ID : 29
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button04
|
|
Attributes
|
|
ID : 30
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button05
|
|
Attributes
|
|
ID : 31
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button06
|
|
Attributes
|
|
ID : 32
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button07
|
|
Attributes
|
|
ID : 33
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
|
|
Touch Release Event
|
|
covx embedded.val,va2.txt,0,0
|
|
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Hotspot button08
|
|
Attributes
|
|
ID : 39
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
click_comp.txt="button08"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Hotspot button09
|
|
Attributes
|
|
ID : 41
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID: disabled
|
|
|
|
Events
|
|
Touch Press Event
|
|
printh 91
|
|
prints "touchevent",0
|
|
printh 00
|
|
prints rand,0
|
|
printh FF FF FF
|
|
click_comp.txt="button09"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Timer swipestore
|
|
Attributes
|
|
ID : 2
|
|
Scope : local
|
|
Period (ms): 50
|
|
Enabled : no
|
|
|
|
Events
|
|
Timer Event
|
|
swipex=tch0
|
|
swipey=tch1
|
|
|
|
Timer timer01
|
|
Attributes
|
|
ID : 35
|
|
Scope : local
|
|
Period (ms): 1000
|
|
Enabled : no
|
|
|
|
Events
|
|
Timer Event
|
|
timer01.en=0
|
|
covx embedded.val,va2.txt,0,0
|
|
covx temp_number.val,va1.txt,0,0
|
|
climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints climatesetting.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
|
|
Timer click_timer
|
|
Attributes
|
|
ID : 50
|
|
Scope : local
|
|
Period (ms): 800
|
|
Enabled : no
|
|
|
|
Events
|
|
Timer Event
|
|
lastclick.txt="{\"page\": \"climate\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
click_timer.en=0
|
|
|
|
Timer wakeup_timer
|
|
Attributes
|
|
ID : 51
|
|
Scope : local
|
|
Period (ms): 100
|
|
Enabled : yes
|
|
|
|
Events
|
|
Timer Event
|
|
if(dim<brightness)
|
|
{
|
|
dimdelta=brightness-dim
|
|
dimdelta/=10
|
|
if(dimdelta<1)
|
|
{
|
|
dimdelta=1
|
|
}
|
|
dim+=dimdelta
|
|
}else
|
|
{
|
|
wakeup_timer.en=0
|
|
}
|
|
|
|
TouchCap swipe
|
|
Attributes
|
|
ID : 1
|
|
Scope: local
|
|
Value: 0
|
|
|
|
Events
|
|
Touch Press Event
|
|
swipestore.en=1 // Start swipestore timer
|
|
|
|
Touch Release Event
|
|
swipestore.en=0
|
|
// Touch has ended, x
|
|
if(tch0==0)
|
|
{
|
|
swipec=swipex-tch2
|
|
// From Left to Right
|
|
if(swipec>swipedx)
|
|
{
|
|
//page
|
|
}
|
|
// Right to Left
|
|
swipec2=0-swipedx
|
|
if(swipec<swipec2)
|
|
{
|
|
//page
|
|
}
|
|
}
|
|
// Touch has ended, y
|
|
if(tch1==0)
|
|
{
|
|
swipec=swipey-tch3
|
|
// From Up to Down
|
|
if(swipec>100)
|
|
{
|
|
//page
|
|
}
|
|
// Down to Up
|
|
swipec2=0-swipedy
|
|
if(swipec<-100)
|
|
{
|
|
//page
|
|
}
|
|
}
|
|
|