Split wakeup_page_id from back_page_id
Solves #1947 and makes the whole wake-up engine more reliable.
This commit is contained in:
@@ -2108,6 +2108,7 @@ script:
|
||||
disp1->send_command_printf("brightness_dim=%i", int(display_dim_brightness->state));
|
||||
disp1->set_component_value("settings.dimslider", int(display_dim_brightness->state));
|
||||
disp1->send_command_printf("brightness_sleep=%i", int(display_sleep_brightness->state));
|
||||
disp1->send_command_printf("wakeup_page_id=%" PRIu8, get_page_id(wakeup_page_name->state.c_str()));
|
||||
boot_progress->execute(6);
|
||||
nextion_init->publish_state(disp1->is_setup());
|
||||
if (api_server->is_connected() and disp1->is_setup()) {
|
||||
@@ -2353,7 +2354,7 @@ script:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (current_page->state == "screensaver" and !id(is_uploading_tft)) {
|
||||
disp1->send_command_printf("back_page_id=%" PRIu8, get_page_id(wakeup_page_name->state.c_str()));
|
||||
disp1->send_command_printf("wakeup_page_id=%" PRIu8, get_page_id(wakeup_page_name->state.c_str()));
|
||||
if (id(screensaver_display_time)) {
|
||||
disp1->set_component_font("screensaver.text", id(screensaver_display_time_font));
|
||||
disp1->set_component_font_color("screensaver.text", id(screensaver_display_time_color));
|
||||
|
||||
@@ -7,6 +7,7 @@ Program.s
|
||||
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
|
||||
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
|
||||
int back_page_id=1
|
||||
int wakeup_page_id=1
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_utilities=0
|
||||
|
||||
@@ -96,7 +96,7 @@ Text tft_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 4.3.1
|
||||
Text : 4.3.2d1
|
||||
Max. Text Size : 9
|
||||
|
||||
Text esph_version
|
||||
|
||||
@@ -23,7 +23,7 @@ Page screensaver
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
@@ -69,7 +69,7 @@ TouchCap wakeup
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
|
||||
@@ -7,6 +7,7 @@ Program.s
|
||||
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
|
||||
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
|
||||
int back_page_id=1
|
||||
int wakeup_page_id=1
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_utilities=0
|
||||
|
||||
@@ -96,7 +96,7 @@ Text tft_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 4.3.1
|
||||
Text : 4.3.2d1
|
||||
Max. Text Size : 9
|
||||
|
||||
Events
|
||||
|
||||
@@ -23,7 +23,7 @@ Page screensaver
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
@@ -69,7 +69,7 @@ TouchCap wakeup
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
|
||||
@@ -7,6 +7,7 @@ Program.s
|
||||
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
|
||||
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
|
||||
int back_page_id=1
|
||||
int wakeup_page_id=1
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_utilities=0
|
||||
|
||||
@@ -96,7 +96,7 @@ Text tft_version
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 4.3.1
|
||||
Text : 4.3.2d1
|
||||
Max. Text Size : 9
|
||||
|
||||
Text esph_version
|
||||
|
||||
@@ -23,7 +23,7 @@ Page screensaver
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
@@ -69,7 +69,7 @@ TouchCap wakeup
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
|
||||
@@ -7,6 +7,7 @@ Program.s
|
||||
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
|
||||
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
|
||||
int back_page_id=1
|
||||
int wakeup_page_id=1
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_utilities=0
|
||||
|
||||
@@ -23,7 +23,7 @@ Page screensaver
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
@@ -69,7 +69,7 @@ TouchCap wakeup
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
|
||||
@@ -7,6 +7,7 @@ Program.s
|
||||
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
|
||||
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
|
||||
int back_page_id=1
|
||||
int wakeup_page_id=1
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_utilities=0
|
||||
|
||||
@@ -23,7 +23,7 @@ Page screensaver
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
@@ -69,7 +69,7 @@ TouchCap wakeup
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
|
||||
@@ -7,6 +7,7 @@ Program.s
|
||||
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
|
||||
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
|
||||
int back_page_id=1
|
||||
int wakeup_page_id=1
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_utilities=0
|
||||
|
||||
@@ -23,7 +23,7 @@ Page screensaver
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
@@ -69,7 +69,7 @@ TouchCap wakeup
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
page wakeup_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user