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 start_up_page: 0 # Boot page
on_setup: on_setup:
lambda: |- lambda: |-
nextion_init->publish_state(true); if (!id(is_uploading_tft)) {
version_tft->update(); nextion_init->publish_state(true);
goto_page->execute("boot"); version_tft->update();
goto_page->execute("boot");
}
on_page: on_page:
lambda: |- lambda: |-
if (current_page->state != page_names[x] or x == 9) { if (!id(is_uploading_tft)) {
current_page->publish_state(page_names[x]); if (current_page->state != page_names[x] or x == 9) {
current_page->publish_state(page_names[x]);
}
} }
on_touch: on_touch: