MADS: Enforce pedalPressed when MADS is disabled

This commit is contained in:
Jason Wen
2024-02-20 14:22:26 +00:00
parent f87e3dc433
commit 5e16cba5bb
+1 -1
View File
@@ -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)