mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-20 09:12:05 +08:00
Compare commits
5 Commits
master-dev
...
ui-neutral
| Author | SHA1 | Date | |
|---|---|---|---|
| c162629ce5 | |||
| 7347c398f8 | |||
| 7411ae3469 | |||
| 2a8bfaa34d | |||
| 1ab3c81962 |
@@ -130,6 +130,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
|
|||||||
userBookmark @95;
|
userBookmark @95;
|
||||||
excessiveActuation @96;
|
excessiveActuation @96;
|
||||||
audioFeedback @97;
|
audioFeedback @97;
|
||||||
|
neutralGear @98;
|
||||||
|
|
||||||
soundsUnavailableDEPRECATED @47;
|
soundsUnavailableDEPRECATED @47;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ class CarSpecificEvents:
|
|||||||
events.add(EventName.wrongGear)
|
events.add(EventName.wrongGear)
|
||||||
if CS.gearShifter == GearShifter.reverse:
|
if CS.gearShifter == GearShifter.reverse:
|
||||||
events.add(EventName.reverseGear)
|
events.add(EventName.reverseGear)
|
||||||
|
if CS.gearShifter == GearShifter.neutral:
|
||||||
|
events.add(EventName.neutralGear)
|
||||||
if not CS.cruiseState.available:
|
if not CS.cruiseState.available:
|
||||||
events.add(EventName.wrongCarMode)
|
events.add(EventName.wrongCarMode)
|
||||||
if CS.espDisabled:
|
if CS.espDisabled:
|
||||||
|
|||||||
@@ -793,6 +793,16 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
|||||||
ET.NO_ENTRY: NoEntryAlert("Reverse Gear"),
|
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.
|
# 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.
|
# When this happens we can no long control the car so the user needs to be warned immediately.
|
||||||
EventName.cruiseDisabled: {
|
EventName.cruiseDisabled: {
|
||||||
@@ -912,6 +922,15 @@ if HARDWARE.get_device_type() == 'mici':
|
|||||||
ET.USER_DISABLE: ImmediateDisableAlert("Reverse"),
|
ET.USER_DISABLE: ImmediateDisableAlert("Reverse"),
|
||||||
ET.NO_ENTRY: NoEntryAlert("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