Loud blindspot alert

Added toggle to enable a louder alert when a vehicle is detected in your blindspot when changing lanes.
This commit is contained in:
FrogAi
2024-02-27 16:34:47 -07:00
parent ae0f095915
commit 3c3120cec1
6 changed files with 17 additions and 2 deletions

View File

@@ -412,7 +412,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.loud_blindspot_alert:
self.events.add(EventName.laneChangeBlockedLoud)
else:
self.events.add(EventName.laneChangeBlocked)
else:
if direction == LaneChangeDirection.left:
self.events.add(EventName.preLaneChangeLeft)
@@ -1059,6 +1062,7 @@ class Controls:
custom_alerts = self.params.get_bool("CustomAlerts")
self.green_light_alert = custom_alerts and self.params.get_bool("GreenLightAlert")
self.lead_departing_alert = custom_alerts and self.params.get_bool("LeadDepartingAlert")
self.loud_blindspot_alert = custom_alerts and self.params.get_bool("LoudBlindspotAlert")
custom_theme = self.params.get_bool("CustomTheme")
custom_sounds = self.params.get_int("CustomSounds") if custom_theme else 0