mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
longcontrol: ignore cruise standstill if interceptor (#26597)
* ignore standstill * cmt * standstill * rm cmt * flip old-commit-hash: a19b5b91d2bcc0cd405599193828b9e9e187c52e
This commit is contained in:
@@ -10,12 +10,14 @@ LongCtrlState = car.CarControl.Actuators.LongControlState
|
|||||||
|
|
||||||
def long_control_state_trans(CP, active, long_control_state, v_ego, v_target,
|
def long_control_state_trans(CP, active, long_control_state, v_ego, v_target,
|
||||||
v_target_1sec, brake_pressed, cruise_standstill):
|
v_target_1sec, brake_pressed, cruise_standstill):
|
||||||
|
# Ignore cruise standstill if car has a gas interceptor
|
||||||
|
cruise_standstill = cruise_standstill and not CP.enableGasInterceptor
|
||||||
accelerating = v_target_1sec > v_target
|
accelerating = v_target_1sec > v_target
|
||||||
planned_stop = (v_target < CP.vEgoStopping and
|
planned_stop = (v_target < CP.vEgoStopping and
|
||||||
v_target_1sec < CP.vEgoStopping and
|
v_target_1sec < CP.vEgoStopping and
|
||||||
not accelerating)
|
not accelerating)
|
||||||
stay_stopped = (v_ego < CP.vEgoStopping and
|
stay_stopped = (v_ego < CP.vEgoStopping and
|
||||||
(brake_pressed or cruise_standstill))
|
(brake_pressed or cruise_standstill))
|
||||||
stopping_condition = planned_stop or stay_stopped
|
stopping_condition = planned_stop or stay_stopped
|
||||||
|
|
||||||
starting_condition = (v_target_1sec > CP.vEgoStarting and
|
starting_condition = (v_target_1sec > CP.vEgoStarting and
|
||||||
|
|||||||
Reference in New Issue
Block a user