mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-08 19:36:14 +08:00
Compare commits
5 Commits
watcher
...
ui-neutral
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c162629ce5 | ||
|
|
7347c398f8 | ||
|
|
7411ae3469 | ||
|
|
2a8bfaa34d | ||
|
|
1ab3c81962 |
@@ -130,6 +130,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
|
||||
userBookmark @95;
|
||||
excessiveActuation @96;
|
||||
audioFeedback @97;
|
||||
neutralGear @98;
|
||||
|
||||
soundsUnavailableDEPRECATED @47;
|
||||
}
|
||||
|
||||
@@ -147,6 +147,8 @@ class CarSpecificEvents:
|
||||
events.add(EventName.wrongGear)
|
||||
if CS.gearShifter == GearShifter.reverse:
|
||||
events.add(EventName.reverseGear)
|
||||
if CS.gearShifter == GearShifter.neutral:
|
||||
events.add(EventName.neutralGear)
|
||||
if not CS.cruiseState.available:
|
||||
events.add(EventName.wrongCarMode)
|
||||
if CS.espDisabled:
|
||||
|
||||
@@ -793,6 +793,16 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
||||
ET.NO_ENTRY: NoEntryAlert("Reverse Gear"),
|
||||
},
|
||||
|
||||
EventName.neutralGear: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Neutral\nGear",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.full,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5),
|
||||
ET.USER_DISABLE: ImmediateDisableAlert("Neutral Gear"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Neutral Gear"),
|
||||
},
|
||||
|
||||
# On cars that use stock ACC the car can decide to cancel ACC for various reasons.
|
||||
# When this happens we can no long control the car so the user needs to be warned immediately.
|
||||
EventName.cruiseDisabled: {
|
||||
@@ -912,6 +922,15 @@ if HARDWARE.get_device_type() == 'mici':
|
||||
ET.USER_DISABLE: ImmediateDisableAlert("Reverse"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Reverse"),
|
||||
},
|
||||
EventName.neutralGear: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Neutral",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.full,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5),
|
||||
ET.USER_DISABLE: ImmediateDisableAlert("Neutral"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Neutral"),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user