From d070d6c39533da0064a545babe4497fbb5b35a3c Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Wed, 25 Mar 2026 09:13:07 -0500 Subject: [PATCH] cem --- selfdrive/ui/mici/onroad/starpilot_status.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/selfdrive/ui/mici/onroad/starpilot_status.py b/selfdrive/ui/mici/onroad/starpilot_status.py index 61715952..28cfaa0f 100644 --- a/selfdrive/ui/mici/onroad/starpilot_status.py +++ b/selfdrive/ui/mici/onroad/starpilot_status.py @@ -1,7 +1,8 @@ import pyray as rl from openpilot.selfdrive.ui.ui_state import UIStatus, UIState -CEM_OVERRIDE_STATUSES = {1, 2} +CEM_DISABLED_OVERRIDE_STATUSES = {1} +CEM_MANUAL_OVERRIDE_STATUSES = {1, 2} CEM_ACTIVE_STATUSES = {3, 4, 5, 6, 7, 8} DISENGAGED_COLOR = rl.Color(18, 40, 57, 255) @@ -20,7 +21,8 @@ def get_border_color(state: UIState): return TRAFFIC_COLOR if state.always_on_lateral_active: return AOL_COLOR - if state.conditional_status in CEM_OVERRIDE_STATUSES: + # Match Qt behavior: only USER_DISABLED (1) gets the CEM override color. + if state.conditional_status in CEM_DISABLED_OVERRIDE_STATUSES: return CEM_OVERRIDE_COLOR if state.sm["selfdriveState"].experimentalMode: return EXPERIMENTAL_COLOR @@ -41,7 +43,7 @@ def get_experimental_mode_banner_text(state: UIState): # With CEM enabled, only surface banner text for explicit manual override states. # Automatic CEM transitions should only be reflected by path/border coloring. if conditional_enabled: - if state.conditional_status in CEM_OVERRIDE_STATUSES: + if state.conditional_status in CEM_MANUAL_OVERRIDE_STATUSES: return "OVERRIDDEN" return None