mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
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: 45f131e0e7d1df168295f180195a3b06aba87736
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user