diff --git a/frogpilot/assets/random_events/sounds/goat.wav b/frogpilot/assets/random_events/sounds/goat.wav new file mode 100644 index 00000000..f557e7e3 Binary files /dev/null and b/frogpilot/assets/random_events/sounds/goat.wav differ diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index f99f2a27..1ff77d32 100644 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -1070,6 +1070,14 @@ FROGPILOT_EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { ET.WARNING: forcing_stop_alert, }, + FrogPilotEventName.goatSteerSaturated: { + ET.WARNING: Alert( + "JESUS TAKE THE WHEEL!!", + "Turn Exceeds Steering Limit", + AlertStatus.userPrompt, AlertSize.mid, + Priority.LOW, VisualAlert.steerRequired, FrogPilotAudibleAlert.goat, 2.), + }, + FrogPilotEventName.openpilotCrashed: { ET.IMMEDIATE_DISABLE: Alert( "openpilot crashed", diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index dc3db508..f9619043 100644 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -404,7 +404,10 @@ class SelfdriveD: turning = abs(desired_lateral_accel) > 1.0 # TODO: lac.saturated includes speed and other checks, should be pulled out if undershooting and turning and lac.saturated: - self.events.add(EventName.steerSaturated) + if self.frogpilot_toggles.goat_scream_alert: + self.frogpilot_events.add(FrogPilotEventName.goatSteerSaturated) + else: + self.events.add(EventName.steerSaturated) # Check for FCW stock_long_is_braking = self.enabled and not self.CP.openpilotLongitudinalControl and CS.aEgo < -1.25 diff --git a/selfdrive/ui/soundd.py b/selfdrive/ui/soundd.py index 50cced31..8e7cf89c 100644 --- a/selfdrive/ui/soundd.py +++ b/selfdrive/ui/soundd.py @@ -52,6 +52,7 @@ sound_list: dict[int, tuple[str, int | None, float]] = { AudibleAlert.warningImmediate: ("warning_immediate.wav", None, MAX_VOLUME), # FrogPilot variables + FrogPilotAudibleAlert.goat: ("goat.wav", None, MAX_VOLUME), } if HARDWARE.get_device_type() in ("tici", "tizi"): sound_list.update({