mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 11:32:21 +08:00
longcontrol: enter stopping state immediately (#26879)
* enter stopping state immediately * Update selfdrive/controls/lib/longcontrol.py old-commit-hash: 4e9bddee5cbabe4807e690a93408a23ce66225d5
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