Accept resumeCruise for resuming prior speed setpoint (#24348)

* accept two button types for resume

* retry CI

* Update selfdrive/controls/lib/drive_helpers.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 45f131e0e7
taco
Jason Young 3 years ago committed by GitHub
parent 66454c000e
commit d82f65a1b7
  1. 2
      selfdrive/controls/lib/drive_helpers.py

@ -79,7 +79,7 @@ def update_v_cruise(v_cruise_kph, buttonEvents, button_timers, enabled, metric):
def initialize_v_cruise(v_ego, buttonEvents, v_cruise_last):
for b in buttonEvents:
# 250kph or above probably means we never had a set speed
if b.type == car.CarState.ButtonEvent.Type.accelCruise and v_cruise_last < 250:
if b.type in (car.CarState.ButtonEvent.Type.accelCruise, car.CarState.ButtonEvent.Type.resumeCruise) and v_cruise_last < 250:
return v_cruise_last
return int(round(clip(v_ego * CV.MS_TO_KPH, V_CRUISE_ENABLE_MIN, V_CRUISE_MAX)))

Loading…
Cancel
Save