Change back_page_id

Reduces a bit the memory in TFT
Simplify the process
Open space for more pages to be used
Not visible by users
This commit is contained in:
Edward Firmo
2023-12-19 09:59:42 +01:00
parent 32d969ed3e
commit 052fc9551c
19 changed files with 180 additions and 440 deletions

View File

@@ -4,6 +4,7 @@ Program.s
int r=0,g=0,b=0
int h=0,s=0,v=0
int p=0,q=0,t=0,f=0
int back_page_id=0
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_entities=0,is_qrcode=0,is_notification=0
@@ -17,10 +18,4 @@ Program.s
{
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
}
printh 92
prints "currentpage",0
printh 00
prints "",0
printh 00
printh FF FF FF
page 8//Power on start page boot

View File

@@ -32,30 +32,23 @@ Variable (string) lastclick
Text :
Max. Text Size: 255
Variable (string) back_page
Attributes
ID : 4
Scope : local
Text : home
Max. Text Size: 15
Variable (string) code_format
Attributes
ID : 29
ID : 28
Scope : local
Text :
Max. Text Size: 15
Variable (string) entity
Attributes
ID : 30
ID : 29
Scope : local
Text :
Max. Text Size: 100
Variable (string) code_arm_req
Attributes
ID : 31
ID : 30
Scope : local
Text :
Max. Text Size: 1
@@ -82,7 +75,7 @@ Text icon_state
Text bt_home_text
Attributes
ID : 6
ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -92,7 +85,7 @@ Text bt_home_text
Text bt_away_text
Attributes
ID : 8
ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -102,7 +95,7 @@ Text bt_away_text
Text bt_night_text
Attributes
ID : 10
ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -112,7 +105,7 @@ Text bt_night_text
Text bt_vacat_text
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -122,7 +115,7 @@ Text bt_vacat_text
Text bt_bypass_text
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -132,7 +125,7 @@ Text bt_bypass_text
Text bt_disarm_text
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -142,7 +135,7 @@ Text bt_disarm_text
Text bt_home_icon
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -152,7 +145,7 @@ Text bt_home_icon
Text bt_away_icon
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -162,7 +155,7 @@ Text bt_away_icon
Text bt_night_icon
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -172,7 +165,7 @@ Text bt_night_icon
Text bt_vacat_icon
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -182,7 +175,7 @@ Text bt_vacat_icon
Text bt_bypass_icon
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -192,7 +185,7 @@ Text bt_bypass_icon
Text bt_disarm_icon
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -202,49 +195,49 @@ Text bt_disarm_icon
Picture bt_home_pic
Attributes
ID : 5
ID : 4
Scope : local
Dragging : 0
Send Component ID: disabled
Picture bt_away_pic
Attributes
ID : 7
ID : 6
Scope : local
Dragging : 0
Send Component ID: disabled
Picture bt_night_pic
Attributes
ID : 9
ID : 8
Scope : local
Dragging : 0
Send Component ID: disabled
Picture bt_vacat_pic
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID: disabled
Picture bt_bypass_pic
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID: disabled
Picture bt_disarm_pic
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID: disabled
Button button_back
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -254,26 +247,11 @@ Button button_back
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
}
page back_page_id
Hotspot bt_home
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -297,7 +275,7 @@ Hotspot bt_home
Hotspot bt_away
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -321,7 +299,7 @@ Hotspot bt_away
Hotspot bt_night
Attributes
ID : 25
ID : 24
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -345,7 +323,7 @@ Hotspot bt_night
Hotspot bt_vacat
Attributes
ID : 26
ID : 25
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -369,7 +347,7 @@ Hotspot bt_vacat
Hotspot bt_bypass
Attributes
ID : 27
ID : 26
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -393,7 +371,7 @@ Hotspot bt_bypass
Hotspot bt_disarm
Attributes
ID : 28
ID : 27
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -417,7 +395,7 @@ Hotspot bt_disarm
Timer wakeup_timer
Attributes
ID : 33
ID : 32
Scope : local
Period (ms): 100
Enabled : yes

View File

@@ -93,42 +93,35 @@ Variable (int32) va0
Scope: local
Value: 0
Variable (string) back_page
Attributes
ID : 36
Scope : local
Text : home
Max. Text Size: 15
Variable (int32) embedded
Attributes
ID : 37
ID : 36
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 38
ID : 37
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 40
ID : 39
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Attributes
ID : 44
ID : 43
Scope: local
Value: 1
Variable (int32) active_slider
Attributes
ID : 45
ID : 44
Scope: local
Value: 1
@@ -467,7 +460,7 @@ Text target_high
Text target_low
Attributes
ID : 46
ID : 45
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -502,7 +495,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 43
ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -527,7 +520,7 @@ Slider slider_low
Button button_back
Attributes
ID : 39
ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -537,22 +530,7 @@ Button button_back
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
}
page back_page_id
Hotspot decrease_temp
Attributes
@@ -636,7 +614,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 800
Enabled : no
@@ -654,7 +632,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 42
ID : 41
Scope : local
Period (ms): 100
Enabled : yes

View File

@@ -34,13 +34,6 @@ Variable (string) coversetting
Text :
Max. Text Size: 255
Variable (string) back_page
Attributes
ID : 12
Scope : local
Text : home
Max. Text Size: 15
Text battery_value
Attributes
ID : 1
@@ -172,7 +165,7 @@ Button cover_stop
Button button_back
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -182,26 +175,11 @@ Button button_back
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
}
page back_page_id
Timer wakeup_timer
Attributes
ID : 14
ID : 13
Scope : local
Period (ms): 100
Enabled : yes

View File

@@ -27,16 +27,9 @@ Variable (string) fansetting
Text :
Max. Text Size: 255
Variable (string) back_page
Attributes
ID : 8
Scope : local
Text : home
Max. Text Size: 15
Variable (string) va0
Attributes
ID : 9
ID : 8
Scope : local
Text :
Max. Text Size: 10
@@ -106,7 +99,7 @@ Slider fanslider
Button button_up
Attributes
ID : 10
ID : 9
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -145,7 +138,7 @@ Button button_up
Button button_on
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -187,7 +180,7 @@ Button button_on
Button button_down
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -226,7 +219,7 @@ Button button_down
Button button_off
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -269,7 +262,7 @@ Button button_off
Button button_back
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -279,22 +272,7 @@ Button button_back
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
}
page back_page_id
Timer swipestore
Attributes
@@ -310,7 +288,7 @@ Timer swipestore
Timer timer0
Attributes
ID : 14
ID : 13
Scope : local
Period (ms): 1000
Enabled : no
@@ -331,7 +309,7 @@ Timer timer0
Timer wakeup_timer
Attributes
ID : 16
ID : 15
Scope : local
Period (ms): 100
Enabled : yes

View File

@@ -13,6 +13,7 @@ Page home
Events
Preinitialize Event
sendme
back_page_id=0
vis bt_notific,is_notification
vis bt_qrcode,is_qrcode
vis bt_entities,is_entities

View File

@@ -78,13 +78,6 @@ Variable (string) lightsetting
Text :
Max. Text Size: 255
Variable (string) back_page
Attributes
ID : 31
Scope : local
Text : home
Max. Text Size: 15
Number ring
Attributes
ID : 4
@@ -417,7 +410,7 @@ Slider tempslider
Button button_back
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -427,22 +420,7 @@ Button button_back
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
}
page back_page_id
Hotspot hsv2rgb
Attributes
@@ -622,7 +600,7 @@ Timer swipestore
Timer wakeup_timer
Attributes
ID : 33
ID : 32
Scope : local
Period (ms): 100
Enabled : yes

View File

@@ -20,42 +20,35 @@ Page media_player
sendme
}
Variable (string) back_page
Attributes
ID : 3
Scope : local
Text : home
Max. Text Size: 15
Variable (string) lastclick
Attributes
ID : 19
ID : 18
Scope : local
Text :
Max. Text Size: 255
Variable (string) va0
Attributes
ID : 22
ID : 21
Scope : local
Text :
Max. Text Size: 10
Variable (int32) is_muted
Attributes
ID : 23
ID : 22
Scope: local
Value: 0
Variable (int32) prg_current
Attributes
ID : 25
ID : 24
Scope: local
Value: 0
Variable (int32) prg_total
Attributes
ID : 26
ID : 25
Scope: local
Value: 0
@@ -81,7 +74,7 @@ Text icon_state
Text vol_text
Attributes
ID : 6
ID : 5
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -91,7 +84,7 @@ Text vol_text
Text bt_vol_down
Attributes
ID : 7
ID : 6
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -117,7 +110,7 @@ Text bt_vol_down
Text bt_vol_up
Attributes
ID : 8
ID : 7
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -143,7 +136,7 @@ Text bt_vol_up
Text bt_mute
Attributes
ID : 9
ID : 8
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -170,7 +163,7 @@ Text bt_mute
Text time_current
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -180,7 +173,7 @@ Text time_current
Text time_total
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -190,7 +183,7 @@ Text time_total
Text track
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -200,7 +193,7 @@ Text track
Text artist
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -210,7 +203,7 @@ Text artist
Text bt_prev
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -229,7 +222,7 @@ Text bt_prev
Text bt_play_pause
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -248,7 +241,7 @@ Text bt_play_pause
Text bt_next
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -267,7 +260,7 @@ Text bt_next
Text bt_on_off
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -286,7 +279,7 @@ Text bt_on_off
Progress Bar time_progress
Attributes
ID : 10
ID : 9
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -294,7 +287,7 @@ Progress Bar time_progress
Slider vol_slider
Attributes
ID : 5
ID : 4
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -310,7 +303,7 @@ Slider vol_slider
Button button_back
Attributes
ID : 4
ID : 3
Scope : local
Dragging : 0
Send Component ID: on release
@@ -320,26 +313,11 @@ Button button_back
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
}
page back_page_id
Timer wakeup_timer
Attributes
ID : 20
ID : 19
Scope : local
Period (ms): 100
Enabled : yes
@@ -362,7 +340,7 @@ Timer wakeup_timer
Timer timer0
Attributes
ID : 21
ID : 20
Scope : local
Period (ms): 1000
Enabled : no
@@ -382,7 +360,7 @@ Timer timer0
Timer prg_timer
Attributes
ID : 24
ID : 23
Scope : local
Period (ms): 1000
Enabled : no