Loud "Car Detected in Blindspot" Alert

This commit is contained in:
James
2025-12-01 12:00:00 -07:00
parent e57691a9b5
commit 81a7d571e6
2 changed files with 12 additions and 1 deletions
+8
View File
@@ -1114,6 +1114,14 @@ FROGPILOT_EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
ET.PERMANENT: holiday_alert,
},
FrogPilotEventName.laneChangeBlockedLoud: {
ET.WARNING: Alert(
"Car Detected in Blindspot",
"",
AlertStatus.userPrompt, AlertSize.small,
Priority.LOW, VisualAlert.none, AudibleAlert.warningSoft, .1),
},
FrogPilotEventName.leadDeparting: {
ET.PERMANENT: Alert(
"Lead Departed",
+4 -1
View File
@@ -288,7 +288,10 @@ class SelfdriveD:
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.frogpilot_events.add(FrogPilotEventName.laneChangeBlockedLoud)
else:
self.events.add(EventName.laneChangeBlocked)
else:
if direction == LaneChangeDirection.left:
self.events.add(EventName.preLaneChangeLeft)