You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(color): run post-model-load warnings via a flat-stack state machine ((#7499))
On a model switch, postModelLoad() ran the throttle/switch warning checks
synchronously from inside an LVGL event callback, each spinning
MainWindow::blockUntilClose() which re-enters lv_timer_handler() from deep in
the call chain. On hardware that re-entrant stack overflows the menus task and
hard-faults (intermittent freeze on TX16S internal MPM); the simulator's larger
stack hid it.
Replace the nested blocking loop on COLORLCD with a core-owned, GUI-agnostic
state machine (model_load_sm) polled once per perMain() (flat stack, no
re-entrancy). It walks the post-load checks (SD / throttle / switches /
failsafe / multi / checklist) and only once all are cleared runs the deferred
model-load tail (postModelLoadFinish: pulsesStart + ...). Pulses stay stopped
until then, preserving the failsafe-hold safety guarantee. A thin COLORLCD view
(model_load_view) mirrors the active state into the existing warning dialogs and
feeds key presses back as an acknowledge.
Decouple the warning predicates from input refresh so they are pure reads:
refreshInputsForWarnings() (getADC + evalInputs + getMovedSwitch) is now called
by the drivers (state machine tick and the boot/flightReset blocking loops), and
the warning dialogs become display-only views. Boot and flightReset keep their
non-re-entrant blocking checkAll() and reuse the same predicates.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments