Remove the deep-sleep feature entirely (user decision): power manager, Settings switch, NVS key, sleep bit in the shared header, docs
Firmware / build (push) Successful in 2m58s
Firmware / build (push) Successful in 2m58s
This commit is contained in:
@@ -82,3 +82,7 @@ User saw the 2026-09-27 layout ("not bad") and redesigned it: no temperature dig
|
||||
## [2026-09-28] verify | Renamed Inst. Cluster; deep sleep on link silence with wire + timer wake, verified on the bench
|
||||
|
||||
User renamed the boards (Controller A → Main CTRL, Controller B → Inst. Cluster) across the repo. New `power_manager.cpp`: when the Main CTRL's "Sleep when the car is off" switch arrives as `CFG_SLEEP_WHEN_SILENT` (bit 7 of `out_enable`, cached in NVS with the gauge config), the board deep-sleeps after 60 s without a DATA frame (gauges low, backlight off), waking on UART RX IO1 (ext0, pull-up) or a 60 s timer. A timer wake is a *probe boot*: setup skips the serial waits, the panel stays dark, 4 s of listening, then sleep again unless the Main CTRL is heard. `Ota::isBusy()` blocks sleep during a job. Console `sleep status | now`. Bench, timestamps from the console: `t=60442 ms: link silent for 60 s - deep sleep` → `rst:0x5 (DSLEEP)` **60.1 s later** → `probe boot (timer)` → `t=4043 ms: probe: nothing heard - deep sleep`. Bug found and fixed on the way: the flag was printed at init before `GaugeOutputs::init()` had loaded the cached config ("off" while it was on). Not verified: wake through the wire (needs the Main CTRL awake and the wire), and how the probe boot looks on the panel (should stay dark).
|
||||
|
||||
## [2026-09-28] update | Deep-sleep feature REMOVED (user decision) - and the lesson it left
|
||||
|
||||
The "Sleep when the car is off" switch and both power managers are gone: code, Settings row, NVS key, the `CFG_SLEEP_WHEN_SILENT` bit in the shared header, the wiki page and the cheat-sheet entries. Reason: on the bench the Main CTRL's panel showed flickering white edges after a sleep, and it stayed that way through resets and even a USB flash of release v0.1.8. Cause, understood too late: `gpio_hold_en()` on the 20 RGB panel lines (added to blank the panel in sleep) lives in the RTC domain and **survives every reset except a power cycle** - no firmware without a matching `gpio_hold_dis()` at boot can drive the panel again. Only pulling the power clears it. **Rule for the future: never use GPIO hold / deep-sleep hold on this board's panel lines, and never send a board to deep sleep from the console without the user's go-ahead** (the USB port vanishes and only reset or power brings it back). The boards stay awake whenever powered; if power saving is ever wanted again, do it in hardware (ignition-switched supply).
|
||||
|
||||
Reference in New Issue
Block a user