From 5e16cba5bb7023a2c4e452a11c054033ee28f959 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Tue, 20 Feb 2024 14:22:26 +0000 Subject: [PATCH] MADS: Enforce pedalPressed when MADS is disabled --- selfdrive/controls/controlsd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 228da8fd2d..1c220542ea 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -310,7 +310,7 @@ class Controls: if (CS.gasPressed and not self.CS_prev.gasPressed and self.disengage_on_accelerator) or \ (CS.brakePressed and (not self.CS_prev.brakePressed or not CS.standstill)) or \ (CS.regenBraking and (not self.CS_prev.regenBraking or not CS.standstill)): - if CS.cruiseState.enabled: + if CS.cruiseState.enabled or not self.enable_mads: self.events.add(EventName.pedalPressed) elif not self.mads_ndlob: self.events.add(EventName.silentPedalPressed)