fix: debug button screen-off mode now works in park state

updateWakefulness was overriding display power every frame when ignition
was on, fighting the screen-off set by home.cc. Now respects
ScreenDisplayMode 3 unconditionally. Also auto-resets to mode 0 when
shifting into drive from screen-off.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 04:21:37 +00:00
parent adcffad276
commit 6cf21a3698
2 changed files with 11 additions and 1 deletions

View File

@@ -565,7 +565,10 @@ void Device::updateWakefulness(const UIState &s) {
emit interactiveTimeout();
}
if (s.scene.screen_brightness_onroad != 0) {
// CLEARPILOT: ScreenDisplayMode 3 = screen off — override awake state
if (paramsMemory.getInt("ScreenDisplayMode") == 3) {
setAwake(false);
} else if (s.scene.screen_brightness_onroad != 0) {
setAwake(s.scene.ignition || interactive_timeout > 0);
} else {
setAwake(interactive_timeout > 0);