From 84b1f363e42293104b4d56ed5b07f549fce381cf Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 31 Dec 2025 12:43:36 -0800 Subject: [PATCH] Alert for stock LKAS (#36969) * alert stock lkas * high * i didn't do this --- cereal/log.capnp | 1 + selfdrive/car/car_specific.py | 2 ++ selfdrive/selfdrived/events.py | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/cereal/log.capnp b/cereal/log.capnp index 3a6432c84d..2f300881b1 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -87,6 +87,7 @@ struct OnroadEvent @0xc4fa6047f024e718 { laneChange @50; lowMemory @51; stockAeb @52; + stockLkas @98; ldw @53; carUnrecognized @54; invalidLkasSetting @55; diff --git a/selfdrive/car/car_specific.py b/selfdrive/car/car_specific.py index cdeeebdcd5..bc903ec083 100644 --- a/selfdrive/car/car_specific.py +++ b/selfdrive/car/car_specific.py @@ -119,6 +119,8 @@ class CarSpecificEvents: events.add(EventName.stockFcw) if CS.stockAeb: events.add(EventName.stockAeb) + if CS.stockLkas: + events.add(EventName.stockLkas) if CS.vEgo > MAX_CTRL_SPEED: events.add(EventName.speedTooHigh) if CS.cruiseState.nonAdaptive: diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index 1acfa2964e..35d4bda42f 100755 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -477,6 +477,15 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { ET.NO_ENTRY: NoEntryAlert("Stock AEB: Risk of Collision"), }, + EventName.stockLkas: { + ET.PERMANENT: Alert( + "TAKE CONTROL", + "Stock LKAS: Lane Departure Detected", + AlertStatus.critical, AlertSize.full, + Priority.HIGH, VisualAlert.fcw, AudibleAlert.none, 2.), + ET.NO_ENTRY: NoEntryAlert("Stock LKAS: Lane Departure Detected"), + }, + EventName.fcw: { ET.PERMANENT: Alert( "BRAKE!",