docs: clarify pedal press (#1289)

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
This commit is contained in:
dzid26
2025-10-05 08:38:49 +01:00
committed by GitHub
parent 520649b893
commit 5a309daee6

View File

@@ -61,6 +61,7 @@ class ModularAssistiveDrivingSystem:
self.unified_engagement_mode = self.params.get_bool("MadsUnifiedEngagementMode")
def pedal_pressed_non_gas_pressed(self, CS: structs.CarState) -> bool:
# ignore `pedalPressed` events caused by gas presses
if self.events.has(EventName.pedalPressed) and not (CS.gasPressed and not self.selfdrive.CS_prev.gasPressed and self.disengage_on_accelerator):
return True