mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 13:32:04 +08:00
longcontrol: enter stopping state immediately (#26879)
* enter stopping state immediately * Update selfdrive/controls/lib/longcontrol.py
This commit is contained in:
@@ -30,10 +30,8 @@ def long_control_state_trans(CP, active, long_control_state, v_ego, v_target,
|
||||
long_control_state = LongCtrlState.off
|
||||
|
||||
else:
|
||||
if long_control_state == LongCtrlState.off:
|
||||
if long_control_state in (LongCtrlState.off, LongCtrlState.pid):
|
||||
long_control_state = LongCtrlState.pid
|
||||
|
||||
elif long_control_state == LongCtrlState.pid:
|
||||
if stopping_condition:
|
||||
long_control_state = LongCtrlState.stopping
|
||||
|
||||
|
||||
Reference in New Issue
Block a user