This commit is contained in:
Jason Wen
2024-11-15 09:01:12 -05:00
committed by GitHub
parent 473349e7b7
commit 3be1fde36b
+1 -1
View File
@@ -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.: