controlsd v_cruise: fix unknown buttons (#26474)

Fix button being None
pull/26473/head
Shane Smiskol 2 years ago committed by GitHub
parent 76ac3d4c99
commit d3f971b365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/controls/lib/drive_helpers.py

@ -90,8 +90,7 @@ class VCruiseHelper:
break break
# Don't adjust speed when pressing resume to exit standstill # Don't adjust speed when pressing resume to exit standstill
cruise_standstill = self.button_change_state[button_type]["standstill"] or CS.cruiseState.standstill if button_type == ButtonType.accelCruise and (self.button_change_state[button_type]["standstill"] or CS.cruiseState.standstill):
if button_type == ButtonType.accelCruise and cruise_standstill:
button_type = None button_type = None
if button_type: if button_type:

Loading…
Cancel
Save