File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,9 @@ def update(self, sm):
6969 long_control_state = sm ['controlsState' ].longControlState
7070 force_slow_decel = sm ['controlsState' ].forceDecel
7171
72- # Reset current state when not engaged, or user is controlling the speed
73- reset_state = long_control_state == LongCtrlState .off
72+ # Reset current state when not engaged or user is controlling the speed
73+ # No reset if car is not using openpilot longitudinal (for accurate planner predictions)
74+ reset_state = long_control_state == LongCtrlState .off and self .CP .openpilotLongitudinalControl
7475
7576 # No change cost when user is controlling the speed, or when standstill
7677 prev_accel_constraint = not (reset_state or sm ['carState' ].standstill )
You can’t perform that action at this time.
0 commit comments