diff --git a/openpilot/selfdrive/ui/sunnypilot/onroad/model_renderer.py b/openpilot/selfdrive/ui/sunnypilot/onroad/model_renderer.py index 3cf639d0a1..4be82bef4a 100644 --- a/openpilot/selfdrive/ui/sunnypilot/onroad/model_renderer.py +++ b/openpilot/selfdrive/ui/sunnypilot/onroad/model_renderer.py @@ -8,6 +8,7 @@ from openpilot.common.filter_simple import FirstOrderFilter from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.selfdrive.ui.sunnypilot.onroad.chevron_metrics import ChevronMetrics from openpilot.selfdrive.ui.sunnypilot.onroad.rainbow_path import RainbowPath +from openpilot.selfdrive.ui.sunnypilot.ui_state import MADSState from openpilot.system.ui.lib.application import gui_app @@ -19,6 +20,11 @@ class ModelRendererSP: @property def _lateral_active(self) -> bool: + sm = ui_state.sm + if sm.valid["selfdriveStateSP"]: + mads = sm["selfdriveStateSP"].mads + if mads.available: + return mads.enabled and mads.state != MADSState.paused return ui_state.status in (UIStatus.ENGAGED, UIStatus.LAT_ONLY) def _get_path_half_width(self) -> float: