Hand-coded Settings + tabbed Gauge Tuning; remembered Wi-Fi; on-screen updates
Firmware / build (push) Successful in 3m58s

Settings (replaces the SquareLine screen, now deleted): sidebar with
Wi-Fi (switch, status card with failure reasons, networks nearby,
full-screen password page), Updates (installed vs latest, Check, Install
behind a confirm dialog) and System (CAN / link / perf overlay switches,
live link, CAN, memory, uptime).

Gauge Tuning: tabs Tachometer / Coolant gauge / Alerts / Simulation,
56 px -/+ rows with hints and real units, accelerating hold-to-repeat,
per-tab Reset with confirm, save indicator, SIMULATION ON chip, swipe
left to go back.

WiFiManager rewritten without LVGL code: one remembered network (NVS
"wifi"), auto-join at boot, scans only on request, no endless reconnect
(keeps the ESP-NOW channel stable), failure reasons from the disconnect
event, password never logged. Ota gains getStatus()/requestCheck()/
requestInstall() for the screen. CAN/UART switches become setEnabled().
Shared ui_kit (header, buttons, switches, confirm dialog); Montserrat
20/24 enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 07:38:17 +02:00
parent 766019a01e
commit e68fad73b6
30 changed files with 2082 additions and 2276 deletions
+3 -26
View File
@@ -1,9 +1,9 @@
/*
* UI State Manager Module
*
* Handles UI state synchronization:
* - Syncs toggle switches with actual service states when screens change
* - Handles SquareLine Studio screen lifecycle (destroy/recreate)
* Holds the debug flag (sent to Controller B, shows LVGL's performance overlay).
* The screen-sync logic for the SquareLine Settings screen went with that
* screen (2026-09-27): the hand-coded Settings screen reads live state itself.
*/
#pragma once
@@ -25,18 +25,6 @@ namespace UIStateManager {
*/
void init();
/**
* @brief Apply saved states to UI switches
*
* This function is called continuously in loop() to sync UI toggle switches
* with the actual running state of services when the Settings screen loads.
* It handles the SquareLine Studio screen lifecycle where screens get
* destroyed/recreated when swiping between screens.
*
* @note This function is thread-safe and uses LVGL locks internally
*/
void applySavedStatesToUI();
/**
* @brief Enable or disable debug mode (LVGL performance and memory monitors)
* @param enabled True to enable debug monitors, false to disable
@@ -49,15 +37,4 @@ void setDebugEnabled(bool enabled);
*/
bool isDebugEnabled();
// ============================================================================
// EVENT HANDLERS (Called from SquareLine Studio UI)
// ============================================================================
/**
* @brief Debug toggle event handler
* @param e LVGL event object
* @note This function is registered in SquareLine Studio UI
*/
void onDebugToggle(lv_event_t *e);
} // namespace UIStateManager