Ignore Nextion events while uploading

Helps with #1946
This commit is contained in:
Edward Firmo
2024-03-22 11:25:30 +01:00
parent d2b924b355
commit 3fb8343246

View File

@@ -862,14 +862,18 @@ display:
start_up_page: 0 # Boot page
on_setup:
lambda: |-
nextion_init->publish_state(true);
version_tft->update();
goto_page->execute("boot");
if (!id(is_uploading_tft)) {
nextion_init->publish_state(true);
version_tft->update();
goto_page->execute("boot");
}
on_page:
lambda: |-
if (current_page->state != page_names[x] or x == 9) {
current_page->publish_state(page_names[x]);
if (!id(is_uploading_tft)) {
if (current_page->state != page_names[x] or x == 9) {
current_page->publish_state(page_names[x]);
}
}
on_touch: