From f5b7f43e7ce99f43ad56dbb6ef459e88090d8f19 Mon Sep 17 00:00:00 2001 From: Julian Cuni Date: Sat, 26 Sep 2026 22:18:18 +0200 Subject: [PATCH] Re-enable the Settings Wi-Fi switch at runtime The SquareLine export has shipped ui_Toggle_Wifi_Switch with LV_STATE_DISABLED since the first commit, so it ignored every touch. OTA needs Wi-Fi joined, so clear the state in UIStateManager's sync (survives SquareLine re-exports). Co-Authored-By: Claude Opus 5.5 --- src/modules/ui_state_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/ui_state_manager.cpp b/src/modules/ui_state_manager.cpp index 91bdb36..a7d23dd 100644 --- a/src/modules/ui_state_manager.cpp +++ b/src/modules/ui_state_manager.cpp @@ -73,6 +73,11 @@ void applySavedStatesToUI() { lvgl_port_lock(-1); + // The SquareLine project ships the WiFi switch with LV_STATE_DISABLED (since + // the first export), which swallows every touch. Wi-Fi is needed to join a + // network for OTA updates, so re-enable it here - survives re-exports. + lv_obj_clear_state(uic_Toggle_Wifi_Switch, LV_STATE_DISABLED); + // Apply WiFi state if (current_wifi_state) { lv_obj_add_state(uic_Toggle_Wifi_Switch, LV_STATE_CHECKED);