Revert "allow in all"

This reverts commit 6375f14891.
This commit is contained in:
Jason Wen
2024-11-26 12:43:30 -05:00
parent 6375f14891
commit 2adfd5f193
+8 -9
View File
@@ -44,7 +44,7 @@ class ModularAssistiveDrivingSystem:
if self.state_machine.state != State.paused:
self.events.add(EventName.silentLkasDisable)
if not self.selfdrive.enabled:
if not self.selfdrive.enabled and self.enabled:
if self.events.has(EventName.wrongGear):
self.events.replace(EventName.wrongGear, EventName.silentWrongGear)
transition_paused_state()
@@ -61,15 +61,14 @@ class ModularAssistiveDrivingSystem:
self.events.replace(EventName.seatbeltNotLatched, EventName.silentSeatbeltNotLatched)
transition_paused_state()
if self.enabled:
if self.disengage_lateral_on_brake_toggle:
if self.events.has(EventName.pedalPressed):
transition_paused_state()
if self.disengage_lateral_on_brake_toggle:
if self.events.has(EventName.pedalPressed):
transition_paused_state()
if not (self.disengage_lateral_on_brake_toggle and self.events.has(EventName.pedalPressed)) and \
not self.events.has_list(GEARS_ALLOW_PAUSED_SILENT):
if self.state_machine.state == State.paused:
self.events.add(EventName.silentLkasEnable)
if not (self.disengage_lateral_on_brake_toggle and self.events.has(EventName.pedalPressed)) and \
not self.events.has_list(GEARS_ALLOW_PAUSED_SILENT):
if self.state_machine.state == State.paused:
self.events.add(EventName.silentLkasEnable)
if self.events.has(EventName.pcmEnable) or self.events.has(EventName.buttonEnable):
update_unified_engagement_mode()