From d3f971b365613329a35a3140b9418977baebd856 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 11 Nov 2022 20:10:12 -0800 Subject: [PATCH] controlsd v_cruise: fix unknown buttons (#26474) Fix button being None --- selfdrive/controls/lib/drive_helpers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index 5ca5319ba5..e9d74c54a9 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -90,8 +90,7 @@ class VCruiseHelper: break # 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 cruise_standstill: + if button_type == ButtonType.accelCruise and (self.button_change_state[button_type]["standstill"] or CS.cruiseState.standstill): button_type = None if button_type: