diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index 4c52c1a63d..975556b759 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -14,8 +14,8 @@ def long_control_state_trans(CP, active, long_control_state, v_ego, should_stop, brake_pressed, cruise_standstill, resume): # Ignore cruise standstill if car has a gas interceptor cruise_standstill = cruise_standstill and not CP.enableGasInterceptorDEPRECATED - stopping_condition = should_stop and not resume - starting_condition = (not should_stop and + stopping_condition = should_stop + starting_condition = ((not should_stop or resume) and not cruise_standstill and not brake_pressed) started_condition = v_ego > CP.vEgoStarting