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
+26 -3
View File
@@ -1,9 +1,9 @@
/**
* ota_update.h - pull firmware updates from this repo's Gitea releases.
*
* Manual only: nothing checks or installs by itself. The `ota` serial console
* drives it today; the planned password-gated Diagnostics screen will call the
* same functions (wiki/pages/open-questions.md #12).
* Manual only: nothing checks or installs by itself. Driven from the Settings
* screen (Updates section: check, then install behind a confirm dialog) and the
* `ota` serial console.
*
* ota status running version, slot, rollback state
* ota check ask Gitea for the latest release, compare versions
@@ -43,6 +43,29 @@ bool handleCommand(const char* line);
/** Firmware version baked in at build time ("dev" for local builds). */
const char* version();
// ---- Settings screen -------------------------------------------------------
typedef enum {
PHASE_IDLE, // nothing asked yet this boot
PHASE_CHECKING,
PHASE_UP_TO_DATE, // latest == running
PHASE_AVAILABLE, // latest != running
PHASE_INSTALLING,
PHASE_FAILED // message says why
} phase_t;
typedef struct {
phase_t phase;
char latest[32]; // latest release tag, once known
char message[96]; // failure reason
} ui_status_t;
ui_status_t getStatus();
/** Queue a check / install (runs in the loop task). False + reason if refused now. */
bool requestCheck(char* why, size_t n);
bool requestInstall(char* why, size_t n);
} // namespace Ota
#endif // OTA_UPDATE_H