From eb9cbd985fce843e26907589d120b04a3bdbb536 Mon Sep 17 00:00:00 2001 From: Julian Cuni Date: Sat, 26 Sep 2026 23:00:28 +0200 Subject: [PATCH] Display quick fixes: instant screen switches, deferred NVS saves, dark OTA writes, version label - screen switches use LV_SCR_LOAD_ANIM_NONE: full-screen fades were re-rendered and blended in software every frame and stuttered at 1024x600 - Tunables: NVS write 3 s after the last change or on leaving the Tuning screen (Tunables::flush()), not per tap - each flash write flickers the RGB panel - OTA: backlight off while the image is written, with full-screen notices before and after; tunables flushed before any reboot - firmware version shown bottom-right on every screen (lv_layer_top) - docs: CLAUDE.md, wiki ota-updates, open-questions #13, log Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 4 +- src/modules/display_init.cpp | 25 ++++++ src/modules/display_init.h | 3 + src/modules/driveline_screen.cpp | 6 +- src/modules/ota_update.cpp | 126 +++++++++++++++++++++++-------- src/modules/tunables.cpp | 31 +++++++- src/modules/tunables.h | 7 ++ src/modules/tuning_screen.cpp | 3 +- wiki/log.md | 4 + wiki/pages/open-questions.md | 2 +- wiki/pages/ota-updates.md | 2 + 11 files changed, 172 insertions(+), 41 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 92335b8..7090ceb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -223,7 +223,7 @@ Settings persist across power cycles via ESP32 NVS (Non-Volatile Storage): ### Tunables (gauge calibration, alert thresholds) -`src/modules/tunables.cpp` owns `link_config_t`: tach pulses/rev + trim + clamps, coolant PWM frequency + duty law + min temp, per-output enables, a bench override (force rpm / duty), and the alert thresholds. Stored as an NVS blob (namespace `tunables`). Edited over the USB serial console: `cfg show`, `cfg set `, `cfg override rpm | duty | both | off`, `cfg reset`. Every change bumps `cfg_version`, which makes the UART task push a CONFIG frame. Overrides are pushed but never saved. The **Gauge Tuning screen** (`src/modules/tuning_screen.cpp`, hand-coded like the driveline screen so SquareLine exports cannot clobber it; Home → swipe right → Driveline → swipe right → Tuning) edits the same values with −/+ buttons, enable switches, and an override panel with RPM and duty sliders. Overrides are never written to NVS (`save()` strips them). +`src/modules/tunables.cpp` owns `link_config_t`: tach pulses/rev + trim + clamps, coolant PWM frequency + duty law + min temp, per-output enables, a bench override (force rpm / duty), and the alert thresholds. Stored as an NVS blob (namespace `tunables`), written 3 s after the last change or on leaving the Tuning screen (`Tunables::flush()`) - every flash write flickers the RGB panel, so no write per tap. Edited over the USB serial console: `cfg show`, `cfg set `, `cfg override rpm | duty | both | off`, `cfg reset`. Every change bumps `cfg_version`, which makes the UART task push a CONFIG frame. Overrides are pushed but never saved. The **Gauge Tuning screen** (`src/modules/tuning_screen.cpp`, hand-coded like the driveline screen so SquareLine exports cannot clobber it; Home → swipe right → Driveline → swipe right → Tuning) edits the same values with −/+ buttons, enable switches, and an override panel with RPM and duty sliders. Overrides are never written to NVS (`save()` strips them). ### Diagnostic probe (`diag` console) @@ -247,7 +247,7 @@ Settings persist across power cycles via ESP32 NVS (Non-Volatile Storage): - Syncs toggle switches with actual service states: `g_wifi_state`, `g_uart_state`, `g_debug_enabled` - Shows loading spinner during sync for smooth UX -**Screens**: Driveline (boot, hand-coded) ← swipe left → Settings (SquareLine); Driveline → swipe right → Gauge Tuning (hand-coded). +**Screens**: Driveline (boot, hand-coded) ← swipe left → Settings (SquareLine); Driveline → swipe right → Gauge Tuning (hand-coded). Screen switches are instant (`LV_SCR_LOAD_ANIM_NONE`): full-screen fades are software-blended every frame and stutter at 1024x600. The firmware version is a label on `lv_layer_top()` (bottom-right, every screen, `DisplayInit`). **Debug Mode**: - Toggle in Settings screen shows/hides `uic_Device_State_Container` diff --git a/src/modules/display_init.cpp b/src/modules/display_init.cpp index 2a76ea2..fde4f98 100644 --- a/src/modules/display_init.cpp +++ b/src/modules/display_init.cpp @@ -6,9 +6,32 @@ #include "display/lvgl_v8_port.h" #include "ui/ui.h" #include "driveline_screen.h" +#include "config/ota_config.h" // FW_VERSION namespace DisplayInit { +static Backlight* g_backlight = nullptr; + +/** + * Firmware version, bottom-right on every screen. Lives on lv_layer_top(), which + * sits above all screens and survives screen switches. Labels aren't + * clickable, so it never steals touches or swipes from the screen below. + * Call with the LVGL lock held. + */ +static void createVersionLabel() { + lv_obj_t* lbl = lv_label_create(lv_layer_top()); + lv_label_set_text(lbl, "A " FW_VERSION); + lv_obj_set_style_text_font(lbl, &lv_font_montserrat_14, 0); + lv_obj_set_style_text_color(lbl, lv_color_hex(0x808080), 0); + lv_obj_align(lbl, LV_ALIGN_BOTTOM_RIGHT, -8, -4); +} + +void setBacklight(bool on) { + if (g_backlight == nullptr) return; + if (on) g_backlight->on(); + else g_backlight->off(); +} + // ============================================================================ // PUBLIC API IMPLEMENTATION // ============================================================================ @@ -76,6 +99,7 @@ DisplayObjects init() { // empty placeholder now (the SquareLine Home screen was removed 2026-09-21); // swap while the backlight is still off so there's no flash. DrivelineScreen::show(); + createVersionLabel(); lvgl_port_unlock(); Serial.println("[DisplayInit] Step 13: SquareLine UI loaded successfully!"); @@ -91,6 +115,7 @@ DisplayObjects init() { Serial.println("[DisplayInit] Display initialization complete!"); // Return board and backlight objects for later use + g_backlight = backlight; return {board, backlight}; } diff --git a/src/modules/display_init.h b/src/modules/display_init.h index afa19a0..c5741bd 100644 --- a/src/modules/display_init.h +++ b/src/modules/display_init.h @@ -43,4 +43,7 @@ struct DisplayObjects { */ DisplayObjects init(); +/** Backlight on/off after init() (e.g. dark during OTA flash writes, which flicker the panel). */ +void setBacklight(bool on); + } // namespace DisplayInit diff --git a/src/modules/driveline_screen.cpp b/src/modules/driveline_screen.cpp index 140594a..7093d10 100644 --- a/src/modules/driveline_screen.cpp +++ b/src/modules/driveline_screen.cpp @@ -145,7 +145,9 @@ static void onScreenGesture(lv_event_t* e) { lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_get_act()); if (dir == LV_DIR_LEFT) { lv_indev_wait_release(lv_indev_get_act()); - _ui_screen_change(&ui_Settings_Screen, LV_SCR_LOAD_ANIM_FADE_ON, 100, 0, + // No transition animation: a full-screen fade is re-rendered and blended + // in software every frame and stutters on this 1024x600 panel. + _ui_screen_change(&ui_Settings_Screen, LV_SCR_LOAD_ANIM_NONE, 0, 0, &ui_Settings_Screen_screen_init); } else if (dir == LV_DIR_RIGHT) { lv_indev_wait_release(lv_indev_get_act()); @@ -257,7 +259,7 @@ static void build() { void show() { build(); - lv_scr_load_anim(g_screen, LV_SCR_LOAD_ANIM_FADE_ON, 100, 0, false); + lv_scr_load_anim(g_screen, LV_SCR_LOAD_ANIM_NONE, 0, 0, false); // instant: fades stutter at 1024x600 } void tick() { diff --git a/src/modules/ota_update.cpp b/src/modules/ota_update.cpp index bfd368d..03824da 100644 --- a/src/modules/ota_update.cpp +++ b/src/modules/ota_update.cpp @@ -17,6 +17,10 @@ #include "drivers/can_driver.h" #include "protocol/automotive_data.h" #include "config/ota_config.h" +#include "modules/display_init.h" +#include "modules/tunables.h" +#include "display/lvgl_v8_port.h" +#include #include #include @@ -277,45 +281,27 @@ static bool verifySignature(const manifest_t& m) { // Install // ============================================================================ -static void install(bool force) { - manifest_t m; - if (!fetchManifest(m) || !verifySignature(m)) return; - - if (!force && strcmp(m.version, FW_VERSION) == 0) { - print("[ota] already running %s - nothing to do (`ota install force` to reinstall)", FW_VERSION); - return; - } - - const esp_partition_t* part = esp_ota_get_next_update_partition(NULL); - if (!part) { print("[ota] no idle OTA slot (partition table?)"); return; } - if (m.size > part->size) { - print("[ota] image %lu B does not fit slot %s (%lu B)", - (unsigned long)m.size, part->label, (unsigned long)part->size); - return; - } - - print("[ota] installing %s -> %s (%lu bytes). Screen may flicker while flash is written.", - m.version, part->label, (unsigned long)m.size); - +/** Download firmware.bin into the idle slot, hashing as it streams; true if it matches the signed manifest. */ +static bool writeImage(const manifest_t& m, const esp_partition_t* part) { String url = String(OTA_DOWNLOAD_BASE) + m.tag + "/firmware.bin"; WiFiClientSecure client; client.setCACert(OTA_CA_PEM); HTTPClient http; http.setConnectTimeout(10000); http.setTimeout(15000); - if (!http.begin(client, url)) { print("[ota] bad download URL"); return; } + if (!http.begin(client, url)) { print("[ota] bad download URL"); return false; } http.setUserAgent("patrol-a-ota/" FW_VERSION); int code = http.GET(); - if (code != HTTP_CODE_OK) { print("[ota] download failed (HTTP %d)", code); http.end(); return; } + if (code != HTTP_CODE_OK) { print("[ota] download failed (HTTP %d)", code); http.end(); return false; } if (http.getSize() != (int)m.size) { print("[ota] server size %d != manifest size %lu", http.getSize(), (unsigned long)m.size); http.end(); - return; + return false; } esp_ota_handle_t h = 0; esp_err_t err = esp_ota_begin(part, OTA_WITH_SEQUENTIAL_WRITES, &h); - if (err != ESP_OK) { print("[ota] esp_ota_begin: %s", esp_err_to_name(err)); http.end(); return; } + if (err != ESP_OK) { print("[ota] esp_ota_begin: %s", esp_err_to_name(err)); http.end(); return false; } uint8_t* buf = (uint8_t*)malloc(CHUNK); mbedtls_sha256_context sc; @@ -361,19 +347,95 @@ static void install(bool force) { print("[ota] SHA-256 MISMATCH - image does not match the signed manifest"); ok = false; } - if (!ok) { esp_ota_abort(h); print("[ota] aborted; still running %s", FW_VERSION); return; } + if (!ok) { esp_ota_abort(h); print("[ota] aborted; still running %s", FW_VERSION); return false; } err = esp_ota_end(h); // validates the image structure + its embedded hash - if (err != ESP_OK) { print("[ota] image check failed: %s", esp_err_to_name(err)); return; } + if (err != ESP_OK) { print("[ota] image check failed: %s", esp_err_to_name(err)); return false; } + return true; + +} + +// ---- Full-screen notice on lv_layer_top() (above every screen) ---------------- +static lv_obj_t* g_notice = NULL; +static lv_obj_t* g_notice_lbl = NULL; + +static void showNotice(const char* text) { + lvgl_port_lock(-1); + if (g_notice == NULL) { + g_notice = lv_obj_create(lv_layer_top()); + lv_obj_remove_style_all(g_notice); + lv_obj_set_size(g_notice, LV_PCT(100), LV_PCT(100)); + lv_obj_set_style_bg_color(g_notice, lv_color_black(), 0); + lv_obj_set_style_bg_opa(g_notice, LV_OPA_COVER, 0); + lv_obj_add_flag(g_notice, LV_OBJ_FLAG_CLICKABLE); // swallow touches while shown + g_notice_lbl = lv_label_create(g_notice); + lv_obj_set_style_text_font(g_notice_lbl, &lv_font_montserrat_30, 0); + lv_obj_set_style_text_color(g_notice_lbl, lv_color_white(), 0); + lv_obj_set_style_text_align(g_notice_lbl, LV_TEXT_ALIGN_CENTER, 0); + lv_obj_center(g_notice_lbl); + } + lv_label_set_text(g_notice_lbl, text); + lv_obj_clear_flag(g_notice, LV_OBJ_FLAG_HIDDEN); + lvgl_port_unlock(); +} + +static void hideNotice() { + lvgl_port_lock(-1); + if (g_notice) lv_obj_add_flag(g_notice, LV_OBJ_FLAG_HIDDEN); + lvgl_port_unlock(); +} + +static void install(bool force) { + manifest_t m; + if (!fetchManifest(m) || !verifySignature(m)) return; + + if (!force && strcmp(m.version, FW_VERSION) == 0) { + print("[ota] already running %s - nothing to do (`ota install force` to reinstall)", FW_VERSION); + return; + } + + const esp_partition_t* part = esp_ota_get_next_update_partition(NULL); + if (!part) { print("[ota] no idle OTA slot (partition table?)"); return; } + if (m.size > part->size) { + print("[ota] image %lu B does not fit slot %s (%lu B)", + (unsigned long)m.size, part->label, (unsigned long)part->size); + return; + } + + print("[ota] installing %s -> %s (%lu bytes)", m.version, part->label, (unsigned long)m.size); + + // Flash writes stall the PSRAM-fed RGB panel (flicker), so the screen is + // dark while the image is written, with a notice before and after. + char msg[160]; + snprintf(msg, sizeof(msg), "Updating to %s\n\nThe screen goes dark for about a minute.\nDo not switch off.", m.version); + showNotice(msg); + delay(3000); // time to read it; LVGL renders on its own task + DisplayInit::setBacklight(false); + bool ok = writeImage(m, part); + DisplayInit::setBacklight(true); // The download took a while - the driver may have started the engine since. - if (!gate(false)) { print("[ota] new image left inactive in %s; retry when parked", part->label); return; } - - err = esp_ota_set_boot_partition(part); - if (err != ESP_OK) { print("[ota] set boot slot: %s", esp_err_to_name(err)); return; } + if (ok && !gate(false)) { + print("[ota] new image left inactive in %s; retry when parked", part->label); + ok = false; + } + if (ok) { + esp_err_t err = esp_ota_set_boot_partition(part); + if (err != ESP_OK) { print("[ota] set boot slot: %s", esp_err_to_name(err)); ok = false; } + } + if (!ok) { + snprintf(msg, sizeof(msg), "Update failed\n\nStill running %s", FW_VERSION); + showNotice(msg); + delay(5000); + hideNotice(); + return; + } print("[ota] verified and installed %s. Rebooting in 3 s; it confirms itself after %lu s of uptime.", m.version, (unsigned long)(OTA_CONFIRM_MS / 1000)); + snprintf(msg, sizeof(msg), "Installed %s\n\nRestarting...", m.version); + showNotice(msg); + Tunables::flush(); delay(3000); esp_restart(); } @@ -451,6 +513,7 @@ static void rollback() { if (!gate(false)) return; if (g_pending_verify) { print("[ota] rejecting this unconfirmed image; rebooting into the previous one"); + Tunables::flush(); delay(500); esp_ota_mark_app_invalid_rollback_and_reboot(); return; @@ -469,7 +532,8 @@ static void rollback() { } esp_err_t err = esp_ota_set_boot_partition(other); if (err != ESP_OK) { print("[ota] set boot slot: %s", esp_err_to_name(err)); return; } - print("[ota] booting %s (built %s %s) in 2 s", other->label, d.date, d.time); + print("[ota] booting %s in 2 s", other->label); + Tunables::flush(); delay(2000); esp_restart(); } diff --git a/src/modules/tunables.cpp b/src/modules/tunables.cpp index dbb5a33..83ba462 100644 --- a/src/modules/tunables.cpp +++ b/src/modules/tunables.cpp @@ -43,6 +43,18 @@ static void save() { prefs.end(); } +// Every flash write briefly stalls the PSRAM-fed RGB panel (flicker), so edits +// are applied + pushed to B at once but written to NVS only after the user +// stops tapping (SAVE_IDLE_MS), on leaving the Tuning screen, or before reboot. +static const uint32_t SAVE_IDLE_MS = 3000; +static bool g_dirty = false; +static uint32_t g_dirty_ms = 0; + +static void markDirty() { // call with the mutex held + g_dirty = true; + g_dirty_ms = millis(); +} + static bool load() { Preferences prefs; prefs.begin(NVS_NAMESPACE, true); @@ -113,7 +125,7 @@ static bool setField(const char* name, long v) { if (ok) { g_cfg.cfg_version++; if (g_cfg.cfg_version == 0) g_cfg.cfg_version = 1; - save(); + markDirty(); } unlock(); return ok; @@ -159,7 +171,7 @@ void set(const link_config_t& cfg) { uint8_t v = g_cfg.cfg_version + 1; g_cfg = cfg; g_cfg.cfg_version = v ? v : 1; - save(); + markDirty(); unlock(); } @@ -168,7 +180,7 @@ void resetDefaults() { uint8_t v = g_cfg.cfg_version + 1; link_config_defaults(&g_cfg); g_cfg.cfg_version = v ? v : 1; - save(); + markDirty(); unlock(); } @@ -203,7 +215,7 @@ bool handleCommand(const char* line) { if (!strcmp(argv[1], "set") && argc == 4) { long v = strtol(argv[3], NULL, 0); if (setField(argv[2], v)) { - print("[cfg] %s = %ld (version %u, saved)", argv[2], v, version()); + print("[cfg] %s = %ld (version %u, saved to NVS in 3 s)", argv[2], v, version()); } else { print("[cfg] unknown field '%s'", argv[2]); help(); @@ -247,7 +259,18 @@ void setExtraCommandHandler(bool (*handler)(const char* line)) { g_extra_handler = handler; } +void flush() { + lock(); + if (g_dirty) { + save(); + g_dirty = false; + } + unlock(); +} + void pollSerial() { + if (g_dirty && millis() - g_dirty_ms > SAVE_IDLE_MS) flush(); + while (Serial.available()) { char c = (char)Serial.read(); if (c == '\r' || c == '\n') { diff --git a/src/modules/tunables.h b/src/modules/tunables.h index 20088b0..83c3cba 100644 --- a/src/modules/tunables.h +++ b/src/modules/tunables.h @@ -58,6 +58,13 @@ bool handleCommand(const char* line); */ void pollSerial(); +/** + * Write pending edits to NVS now. Edits are otherwise saved SAVE_IDLE_MS after + * the last change (each flash write flickers the RGB panel). Call before a + * reboot or when leaving the Tuning screen. + */ +void flush(); + /** * Register a second console command handler (e.g. DiagProbe::handleCommand) * that gets lines `cfg` does not recognise. Returns true if it consumed the line. diff --git a/src/modules/tuning_screen.cpp b/src/modules/tuning_screen.cpp index 0e4b1ef..9db942c 100644 --- a/src/modules/tuning_screen.cpp +++ b/src/modules/tuning_screen.cpp @@ -334,6 +334,7 @@ namespace TuningScreen { if (lv_event_get_code(e) != LV_EVENT_CLICKED) return; + Tunables::flush(); // write pending edits now rather than after the idle delay DrivelineScreen::show(); } @@ -584,7 +585,7 @@ namespace TuningScreen { build(); refreshFromTunables(); - lv_scr_load_anim(g_screen, LV_SCR_LOAD_ANIM_FADE_ON, 100, 0, false); + lv_scr_load_anim(g_screen, LV_SCR_LOAD_ANIM_NONE, 0, 0, false); // instant: fades stutter at 1024x600 } void tick() diff --git a/wiki/log.md b/wiki/log.md index 92acace..1ea572f 100644 --- a/wiki/log.md +++ b/wiki/log.md @@ -121,3 +121,7 @@ First CI runs green (main-latest built with version main-1ec93dc baked in; v0.1. ## [2026-09-26] verify | First OTA update end-to-end Bench (home, both controllers on laptop USB, no car): A running USB-flashed `dev` ran `ota install` -> v0.1.1 from the signed CI release: 1.65 MB in ~60 s, verified, rebooted into app1, confirmed after 30 s (rollback cancelled). v0.1.1 then passed `ota check` ("up to date"), so OTA-from-OTA works. ota-updates.md marked VERIFIED. + +## [2026-09-26] build | Display quick fixes (v0.1.2) + +User reported heavy flicker during OTA and on Gauge Tuning taps, and laggy swipes. Diagnosis: flash and PSRAM share the MSPI cache; every flash write (OTA, or the NVS save on each Tuning tap) stalls the PSRAM framebuffer the RGB panel streams from, with no bounce buffer (ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE=0) - a known ESP32-S3 RGB issue. Swipes: every transition was LV_SCR_LOAD_ANIM_FADE_ON 100 ms - a full 1024x600 software re-render + alpha blend per frame. Also: the Debug "FPS" counts loop() passes (loop sleeps 100 ms), not rendering - real render FPS has never been measured. Quick fixes: instant screen switches; Tunables NVS writes deferred to 3 s idle / leaving Tuning; backlight off during OTA writes with before/after notices; firmware version label bottom-right on every screen. Real cure (bounce buffers + SPIRAM_XIP_FROM_PSRAM via custom_sdkconfig, needs internal RAM freed first) is planned as one measured bench session with open-questions #13. diff --git a/wiki/pages/open-questions.md b/wiki/pages/open-questions.md index 12b9816..828933a 100644 --- a/wiki/pages/open-questions.md +++ b/wiki/pages/open-questions.md @@ -70,4 +70,4 @@ The research frontier. Answering any of these should trigger updates across the - ~~A worked generic-PID set for an M57 diesel~~ ✅ ingested → [[dwr-335d-torque-pids]] (2009 335d, DDE7.3; J1979 mode-01 scalings gauge-checked by the author) - DWR's **Testo parameter list** (e90post "Testo" thread, post 175, German→English names of the DDE's non-standard values) — the pointer for Route B identifiers if our own Launch capture is not enough -13. **Internal RAM is nearly exhausted (found 2026-09-26).** With display + Wi-Fi up: 15.9 KB internal free, largest block 7.6 KB (PSRAM 7.1 MB free). OTA works around it ([[ota-updates]]), but anything else that needs an internal allocation (another task, a TLS client, a bigger Wi-Fi burst) can fail. Biggest known consumer: the LVGL 60-line DMA draw buffer (~120 KB). Options: shrink it to ~30–40 lines, or measure what else lives in internal RAM first (`heap_caps_print_heap_info`). Not urgent, but it limits every future feature. +13. **Internal RAM is nearly exhausted (found 2026-09-26).** With display + Wi-Fi up: 15.9 KB internal free, largest block 7.6 KB (PSRAM 7.1 MB free). OTA works around it ([[ota-updates]]), but anything else that needs an internal allocation (another task, a TLS client, a bigger Wi-Fi burst) can fail. Biggest known consumer: the LVGL 60-line DMA draw buffer (~120 KB). Options: shrink it to ~30–40 lines, or measure what else lives in internal RAM first (`heap_caps_print_heap_info`). Not urgent, but it limits every future feature. **Same project as the display flicker/lag (2026-09-26):** flash writes flicker the PSRAM-fed RGB panel (no bounce buffer) and full-screen transitions stutter. Espressif's cure is bounce buffers + `CONFIG_SPIRAM_XIP_FROM_PSRAM` (needs pioarduino `custom_sdkconfig`), and bounce buffers need internal RAM — so free RAM, add bounce buffers, and measure real render FPS (LVGL perf monitor; the Debug "FPS" counts `loop()` passes, not frames) in one bench session. Quick mitigations shipped in v0.1.2 (instant screen switches, deferred NVS saves, dark screen during OTA). diff --git a/wiki/pages/ota-updates.md b/wiki/pages/ota-updates.md index a50e62d..b3eff4c 100644 --- a/wiki/pages/ota-updates.md +++ b/wiki/pages/ota-updates.md @@ -30,6 +30,8 @@ Push to `main` (no tag) builds a rolling **pre-release `main-latest`** — unsig `dev` (USB-flashed) → `ota install` → **v0.1.1** from CI: 1.65 MB downloaded + written in ~60 s (~27 KB/s), sha256 + signature OK, rebooted into `app1` as PENDING_VERIFY, ESP-NOW up, **confirmed after 30 s**. The installed v0.1.1 then ran `ota check` itself ("up to date") — it can take the next update. Previous image kept in `app0` for `ota rollback`. +During the write the backlight is off (flash writes flicker the PSRAM-fed panel): a full-screen notice "Updating to vX … do not switch off" shows for 3 s first, then "Installed vX / Restarting" or "Update failed / still running vY" (v0.1.2+). The running version is always shown bottom-right on every screen. + Known quirk: `ota status` shows the *other* slot's "built" date from the framework's precompiled app descriptor (e.g. "Nov 4 2025"), not our build time — ignore it. ## Decisions and why