mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-26 03:02:06 +08:00
init
This commit is contained in:
@@ -340,6 +340,7 @@ struct OnroadEventSP @0xda96579883444c35 {
|
||||
speedLimitChanged @21;
|
||||
speedLimitPending @22;
|
||||
e2eChime @23;
|
||||
chillModeSwitched @24;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,5 +46,8 @@ class CruiseHelper:
|
||||
if self.button_frame_counts[ButtonType.gapAdjustCruise] >= DISTANCE_LONG_PRESS and not self.experimental_mode_switched:
|
||||
self._experimental_mode = not experimental_mode
|
||||
self.params.put_bool_nonblocking("ExperimentalMode", self._experimental_mode)
|
||||
events.add(EventNameSP.experimentalModeSwitched)
|
||||
if self._experimental_mode:
|
||||
events.add(EventNameSP.experimentalModeSwitched)
|
||||
else:
|
||||
events.add(EventNameSP.chillModeSwitched)
|
||||
self.experimental_mode_switched = True
|
||||
|
||||
@@ -164,7 +164,11 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
||||
},
|
||||
|
||||
EventNameSP.experimentalModeSwitched: {
|
||||
ET.WARNING: NormalPermanentAlert("Experimental Mode Switched", duration=1.5)
|
||||
ET.WARNING: NormalPermanentAlert("Experimental Mode", duration=1.5)
|
||||
},
|
||||
|
||||
EventNameSP.chillModeSwitched: {
|
||||
ET.WARNING: NormalPermanentAlert("Chill Mode", duration=1.5)
|
||||
},
|
||||
|
||||
EventNameSP.wrongCarModeAlertOnly: {
|
||||
|
||||
Reference in New Issue
Block a user