|
|
@ -359,6 +359,16 @@ def personality_changed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging |
|
|
|
return NormalPermanentAlert(f"Driving Personality: {personality}", duration=1.5) |
|
|
|
return NormalPermanentAlert(f"Driving Personality: {personality}", duration=1.5) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def invalid_lkas_setting_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: |
|
|
|
|
|
|
|
text = "Toggle stock LKAS on or off to engage" |
|
|
|
|
|
|
|
if CP.brand == "tesla": |
|
|
|
|
|
|
|
text = "Switch to Traffic-Aware Cruise Control to engage" |
|
|
|
|
|
|
|
elif CP.brand == "mazda": |
|
|
|
|
|
|
|
text = "Enable your car's LKAS to engage" |
|
|
|
|
|
|
|
elif CP.brand == "nissan": |
|
|
|
|
|
|
|
text = "Disable your car's stock LKAS to engage" |
|
|
|
|
|
|
|
return NormalPermanentAlert("Invalid LKAS setting", text) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { |
|
|
|
EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { |
|
|
|
# ********** events with no alerts ********** |
|
|
|
# ********** events with no alerts ********** |
|
|
@ -412,8 +422,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
EventName.invalidLkasSetting: { |
|
|
|
EventName.invalidLkasSetting: { |
|
|
|
ET.PERMANENT: NormalPermanentAlert("Invalid LKAS setting", |
|
|
|
ET.PERMANENT: invalid_lkas_setting_alert, |
|
|
|
"Toggle stock LKAS on or off to engage"), |
|
|
|
|
|
|
|
ET.NO_ENTRY: NoEntryAlert("Invalid LKAS setting"), |
|
|
|
ET.NO_ENTRY: NoEntryAlert("Invalid LKAS setting"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|