From 9b92cdd2cc9ef5a4a4c8ad319f2953b8640d273a Mon Sep 17 00:00:00 2001 From: Nayan Date: Thu, 9 Oct 2025 23:57:09 -0400 Subject: [PATCH] ui: fix standstill timer reset when offroad (#1351) Standstill timer fix --- selfdrive/ui/sunnypilot/qt/onroad/hud.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc index bc7060d31c..251140ad17 100644 --- a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc +++ b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc @@ -107,6 +107,7 @@ void HudRendererSP::updateState(const UIState &s) { standstillTimer = s.scene.standstill_timer; isStandstill = car_state.getStandstill(); + if (not s.scene.started) standstillElapsedTime = 0.0; longOverride = car_control.getCruiseControl().getOverride(); smartCruiseControlVisionEnabled = lp_sp.getSmartCruiseControl().getVision().getEnabled(); smartCruiseControlVisionActive = lp_sp.getSmartCruiseControl().getVision().getActive(); @@ -250,6 +251,7 @@ void HudRendererSP::draw(QPainter &p, const QRect &surface_rect) { // No Alerts displayed else { e2eAlertFrame = 0; + if (not isStandstill) standstillElapsedTime = 0.0; } // Blinker