From 88418aa418011d7ffebb76b8ed13454d3842e0f6 Mon Sep 17 00:00:00 2001 From: Kumar <36933347+rav4kumar@users.noreply.github.com> Date: Tue, 15 Sep 2026 15:39:32 -0700 Subject: [PATCH] Update longcontrol.py --- openpilot/selfdrive/controls/lib/longcontrol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpilot/selfdrive/controls/lib/longcontrol.py b/openpilot/selfdrive/controls/lib/longcontrol.py index 99e0cf7e45..7b058fa178 100644 --- a/openpilot/selfdrive/controls/lib/longcontrol.py +++ b/openpilot/selfdrive/controls/lib/longcontrol.py @@ -40,6 +40,7 @@ def long_control_state_trans(CP_SP, active, long_control_state, return long_control_state + class LongControl(LongControlSP): def __init__(self, CP, CP_SP): self.CP = CP @@ -66,7 +67,7 @@ class LongControl(LongControlSP): elif self.long_control_state == LongCtrlState.stopping: output_accel = self.last_output_accel - if output_accel > self.CP.stopAccel and not LongControlSP.should_hold_stopping(self, CS, a_target): + if output_accel > self.CP.stopAccel: output_accel = min(output_accel, 0.0) # TODO: can we just go straight to stopAccel? output_accel -= self.stopping_decel_rate(CS.vEgo) * DT_CTRL