diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index f1d112a2c..1319e503a 100644 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -297,7 +297,10 @@ class Controls: direction = self.sm['modelV2'].meta.laneChangeDirection if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \ (CS.rightBlindspot and direction == LaneChangeDirection.right): - self.events.add(EventName.laneChangeBlocked) + if self.frogpilot_toggles.loud_blindspot_alert: + self.events.add(EventName.laneChangeBlockedLoud) + else: + self.events.add(EventName.laneChangeBlocked) else: if direction == LaneChangeDirection.left: if self.sm['frogpilotPlan'].laneWidthLeft >= self.frogpilot_toggles.lane_detection_width: diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 0b5d9a637..7a2d4ab83 100755 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -1002,6 +1002,14 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { Priority.MID, VisualAlert.none, AudibleAlert.prompt, 3.), }, + EventName.laneChangeBlockedLoud: { + ET.WARNING: Alert( + "Car detected in blindspot", + "", + AlertStatus.userPrompt, AlertSize.small, + Priority.LOW, VisualAlert.none, AudibleAlert.warningSoft, .1), + }, + EventName.leadDeparting: { ET.PERMANENT: Alert( "Lead departed",