diff --git a/sunnypilot/mads/mads.py b/sunnypilot/mads/mads.py index 66b3b4b5a2..b7422af90b 100644 --- a/sunnypilot/mads/mads.py +++ b/sunnypilot/mads/mads.py @@ -93,12 +93,6 @@ class ModularAssistiveDrivingSystem: if self.events.has(EventName.parkBrake): self.events.replace(EventName.parkBrake, EventName.silentParkBrake) transition_paused_state() - if self.events.has(EventName.wrongCarMode): - self.events.replace(EventName.wrongCarMode, EventName.wrongCarModeNoEntry) - transition_paused_state() - if self.events.has(EventName.wrongCruiseMode): - self.events.replace(EventName.wrongCruiseMode, EventName.wrongCruiseModeNoEntry) - transition_paused_state() if self.disengage_lateral_on_brake_toggle: if CS.brakePressed: @@ -130,6 +124,8 @@ class ModularAssistiveDrivingSystem: self.events.add(EventName.lkasDisable) else: self.events.add(EventName.lkasEnable) + if be.type not in (ButtonType.accelCruise, ButtonType.resumeCruise, ButtonType.decelCruise, ButtonType.setCruise): + self.events.remove(EventName.wrongCruiseMode) if not CS.cruiseState.available: self.events.remove(EventName.buttonEnable) @@ -139,6 +135,7 @@ class ModularAssistiveDrivingSystem: self.events.remove(EventName.pcmDisable) self.events.remove(EventName.buttonCancel) self.events.remove(EventName.pedalPressed) + self.events.remove(EventName.wrongCarMode) if self.mismatch_counter >= 200: self.events.add(EventName.controlsMismatchLateral)