This commit is contained in:
Jason Wen
2024-11-25 00:09:14 -05:00
parent 7fbdc63f11
commit 2fbe4e8f71
2 changed files with 12 additions and 4 deletions
+10 -2
View File
@@ -1037,12 +1037,20 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
},
EventName.silentDoorOpen: {
ET.SOFT_DISABLE: user_soft_disable_alert("Door Open"),
ET.WARNING: Alert(
"",
"",
AlertStatus.normal, AlertSize.mid,
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0.),
ET.NO_ENTRY: NoEntryAlert("Door Open"),
},
EventName.silentSeatbeltNotLatched: {
ET.SOFT_DISABLE: user_soft_disable_alert("Seatbelt Unlatched"),
ET.WARNING: Alert(
"",
"",
AlertStatus.normal, AlertSize.mid,
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0.),
ET.NO_ENTRY: NoEntryAlert("Seatbelt Unlatched"),
},
+2 -2
View File
@@ -45,10 +45,10 @@ class ModularAssistiveDrivingSystem:
self.events.add(EventName.silentLkasDisable)
if not self.selfdrive.enabled and self.enabled:
if self.events.has(EventName.wrongGear) and not self.events.has(EventName.reverseGear):
if self.events.has(EventName.wrongGear):
self.events.replace(EventName.wrongGear, EventName.silentWrongGear)
transition_paused_state()
if self.events.has(EventName.reverseGear) and CS.vEgo < 5:
if self.events.has(EventName.reverseGear):
self.events.replace(EventName.reverseGear, EventName.silentReverseGear)
transition_paused_state()
if self.events.has(EventName.brakeHold):