From acfe52317bb4f879d286b6a44baf1fc7dbc835da Mon Sep 17 00:00:00 2001 From: royjr Date: Tue, 2 Dec 2025 21:56:48 -0500 Subject: [PATCH] init --- cereal/custom.capnp | 1 + sunnypilot/selfdrive/car/cruise_helpers.py | 5 ++++- sunnypilot/selfdrive/selfdrived/events.py | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cereal/custom.capnp b/cereal/custom.capnp index 5c0a004fa6..722c699278 100644 --- a/cereal/custom.capnp +++ b/cereal/custom.capnp @@ -340,6 +340,7 @@ struct OnroadEventSP @0xda96579883444c35 { speedLimitChanged @21; speedLimitPending @22; e2eChime @23; + chillModeSwitched @24; } } diff --git a/sunnypilot/selfdrive/car/cruise_helpers.py b/sunnypilot/selfdrive/car/cruise_helpers.py index 1c0026e12f..9ae8a7b7d6 100644 --- a/sunnypilot/selfdrive/car/cruise_helpers.py +++ b/sunnypilot/selfdrive/car/cruise_helpers.py @@ -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 diff --git a/sunnypilot/selfdrive/selfdrived/events.py b/sunnypilot/selfdrive/selfdrived/events.py index 4edc0bd470..44f289383d 100644 --- a/sunnypilot/selfdrive/selfdrived/events.py +++ b/sunnypilot/selfdrive/selfdrived/events.py @@ -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: {