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:
@@ -121,6 +121,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
|||||||
frogSteerSaturated @122;
|
frogSteerSaturated @122;
|
||||||
greenLight @123;
|
greenLight @123;
|
||||||
holidayActive @124;
|
holidayActive @124;
|
||||||
|
laneChangeBlockedLoud @125;
|
||||||
leadDeparting @126;
|
leadDeparting @126;
|
||||||
|
|
||||||
radarCanErrorDEPRECATED @15;
|
radarCanErrorDEPRECATED @15;
|
||||||
|
|||||||
@@ -285,6 +285,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
|||||||
{"LockDoors", PERSISTENT},
|
{"LockDoors", PERSISTENT},
|
||||||
{"LongitudinalTune", PERSISTENT},
|
{"LongitudinalTune", PERSISTENT},
|
||||||
{"LongPitch", PERSISTENT},
|
{"LongPitch", PERSISTENT},
|
||||||
|
{"LoudBlindspotAlert", PERSISTENT},
|
||||||
{"ManualUpdateInitiated", CLEAR_ON_MANAGER_START},
|
{"ManualUpdateInitiated", CLEAR_ON_MANAGER_START},
|
||||||
{"ModelUI", PERSISTENT},
|
{"ModelUI", PERSISTENT},
|
||||||
{"MuteOverheated", PERSISTENT},
|
{"MuteOverheated", PERSISTENT},
|
||||||
|
|||||||
@@ -412,7 +412,10 @@ class Controls:
|
|||||||
direction = self.sm['modelV2'].meta.laneChangeDirection
|
direction = self.sm['modelV2'].meta.laneChangeDirection
|
||||||
if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \
|
if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \
|
||||||
(CS.rightBlindspot and direction == LaneChangeDirection.right):
|
(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:
|
else:
|
||||||
if direction == LaneChangeDirection.left:
|
if direction == LaneChangeDirection.left:
|
||||||
self.events.add(EventName.preLaneChangeLeft)
|
self.events.add(EventName.preLaneChangeLeft)
|
||||||
@@ -1059,6 +1062,7 @@ class Controls:
|
|||||||
custom_alerts = self.params.get_bool("CustomAlerts")
|
custom_alerts = self.params.get_bool("CustomAlerts")
|
||||||
self.green_light_alert = custom_alerts and self.params.get_bool("GreenLightAlert")
|
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.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_theme = self.params.get_bool("CustomTheme")
|
||||||
custom_sounds = self.params.get_int("CustomSounds") if custom_theme else 0
|
custom_sounds = self.params.get_int("CustomSounds") if custom_theme else 0
|
||||||
|
|||||||
@@ -1003,6 +1003,14 @@ EVENTS: Dict[int, Dict[str, Union[Alert, AlertCallbackType]]] = {
|
|||||||
ET.PERMANENT: holiday_alert,
|
ET.PERMANENT: holiday_alert,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
EventName.laneChangeBlockedLoud: {
|
||||||
|
ET.WARNING: Alert(
|
||||||
|
"Car Detected in Blindspot",
|
||||||
|
"",
|
||||||
|
AlertStatus.userPrompt, AlertSize.small,
|
||||||
|
Priority.LOW, VisualAlert.none, AudibleAlert.warningSoft, .1),
|
||||||
|
},
|
||||||
|
|
||||||
EventName.leadDeparting: {
|
EventName.leadDeparting: {
|
||||||
ET.PERMANENT: Alert(
|
ET.PERMANENT: Alert(
|
||||||
"Lead departed",
|
"Lead departed",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ FrogPilotVisualsPanel::FrogPilotVisualsPanel(SettingsWindow *parent) : FrogPilot
|
|||||||
{"CustomAlerts", "Custom Alerts", "Enable custom alerts for various logic or situational changes.", "../frogpilot/assets/toggle_icons/icon_green_light.png"},
|
{"CustomAlerts", "Custom Alerts", "Enable custom alerts for various logic or situational changes.", "../frogpilot/assets/toggle_icons/icon_green_light.png"},
|
||||||
{"GreenLightAlert", "Green Light Alert", "Get an alert when a traffic light changes from red to green.", ""},
|
{"GreenLightAlert", "Green Light Alert", "Get an alert when a traffic light changes from red to green.", ""},
|
||||||
{"LeadDepartingAlert", "Lead Departing Alert", "Get an alert when your lead vehicle starts departing when you're at a standstill.", ""},
|
{"LeadDepartingAlert", "Lead Departing Alert", "Get an alert when your lead vehicle starts departing when you're at a standstill.", ""},
|
||||||
|
{"LoudBlindspotAlert", "Loud Blindspot Alert", "Enable a louder alert for when a vehicle is detected in your blindspot when attempting to change lanes.", ""},
|
||||||
|
|
||||||
{"CustomUI", "Custom Onroad UI", "Customize the Onroad UI with some additional visual functions.", "../assets/offroad/icon_road.png"},
|
{"CustomUI", "Custom Onroad UI", "Customize the Onroad UI with some additional visual functions.", "../assets/offroad/icon_road.png"},
|
||||||
{"AccelerationPath", "Acceleration Path", "Visualize the car's intended acceleration or deceleration with a color-coded path.", ""},
|
{"AccelerationPath", "Acceleration Path", "Visualize the car's intended acceleration or deceleration with a color-coded path.", ""},
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ private:
|
|||||||
void updateToggles();
|
void updateToggles();
|
||||||
|
|
||||||
std::set<QString> alertVolumeControlKeys = {"EngageVolume", "DisengageVolume", "RefuseVolume", "PromptVolume", "PromptDistractedVolume", "WarningSoftVolume", "WarningImmediateVolume"};
|
std::set<QString> alertVolumeControlKeys = {"EngageVolume", "DisengageVolume", "RefuseVolume", "PromptVolume", "PromptDistractedVolume", "WarningSoftVolume", "WarningImmediateVolume"};
|
||||||
std::set<QString> customAlertsKeys = {"GreenLightAlert", "LeadDepartingAlert"};
|
std::set<QString> customAlertsKeys = {"GreenLightAlert", "LeadDepartingAlert", "LoudBlindspotAlert"};
|
||||||
std::set<QString> customOnroadUIKeys = {"AccelerationPath", "AdjacentPath", "BlindSpotPath", "FPSCounter", "LeadInfo"};
|
std::set<QString> customOnroadUIKeys = {"AccelerationPath", "AdjacentPath", "BlindSpotPath", "FPSCounter", "LeadInfo"};
|
||||||
std::set<QString> customThemeKeys = {"HolidayThemes", "CustomColors", "CustomIcons", "CustomSignals", "CustomSounds"};
|
std::set<QString> customThemeKeys = {"HolidayThemes", "CustomColors", "CustomIcons", "CustomSignals", "CustomSounds"};
|
||||||
std::set<QString> modelUIKeys = {"DynamicPathWidth", "LaneLinesWidth", "PathEdgeWidth", "PathWidth", "RoadEdgesWidth", "UnlimitedLength"};
|
std::set<QString> modelUIKeys = {"DynamicPathWidth", "LaneLinesWidth", "PathEdgeWidth", "PathWidth", "RoadEdgesWidth", "UnlimitedLength"};
|
||||||
|
|||||||
Reference in New Issue
Block a user