diff --git a/selfdrive/car/car_specific.py b/selfdrive/car/car_specific.py index d9e6cf3d3e..ac2f4200f3 100644 --- a/selfdrive/car/car_specific.py +++ b/selfdrive/car/car_specific.py @@ -149,7 +149,7 @@ class CarSpecificEvents: # Main button also can trigger an engagement on these cars self.cruise_buttons.append(any(ev.type in HYUNDAI_ENABLE_BUTTONS for ev in CS.buttonEvents)) events = self.create_common_events(CS, CS_prev, pcm_enable=self.CP.pcmCruise, allow_enable=any(self.cruise_buttons), - allow_cancel=(self.CP.pcmCruise and b.pressed) or not self.CP.pcmCruise) + allow_cancel=any(self.CP.pcmCruise and b.type == ButtonType.cancel and b.pressed for b in CS.buttonEvents) or not self.CP.pcmCruise) # low speed steer alert hysteresis logic (only for cars with steer cut off above 10 m/s) if CS.vEgo < (self.CP.minSteerSpeed + 2.) and self.CP.minSteerSpeed > 10.: