Manage indoor temp and weather icon as buttons

Solves #2056
This commit is contained in:
Edward Firmo
2024-04-24 15:46:11 +02:00
parent 72d4cd4b01
commit c4b91b8ea0
10 changed files with 157 additions and 23 deletions

View File

@@ -83,6 +83,24 @@ Text indr_temp
Text :
Max. Text Size : 8
Events
Touch Press Event
click_comp.txt="indr_temp"
click_timer.en=1
Touch Release Event
if(click_timer.en==1)
{
click_timer.en=0
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
}
Text outdoor_temp
Attributes
ID : 5
@@ -317,6 +335,24 @@ Text indr_temp_icon
Text :
Max. Text Size : 3
Events
Touch Press Event
click_comp.txt="indr_temp_icon"
click_timer.en=1
Touch Release Event
if(click_timer.en==1)
{
click_timer.en=0
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints lastclick.txt,0
printh 00
printh FF FF FF
}
Text bt_notific
Attributes
ID : 28
@@ -659,9 +695,20 @@ Picture weather
Events
Touch Press Event
if(api==1)
click_comp.txt="indr_temp_icon"
click_timer.en=1
Touch Release Event
if(click_timer.en==1)
{
page weather01
click_timer.en=0
lastclick.txt="{\"page\": \"home\", \"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