From d018fd56da8eb45c19bcd01c201f41ad733781da Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 10 Sep 2024 15:55:18 -0700 Subject: [PATCH] AEB prep (#33515) * init aeb * remove that for now --- cereal/car.capnp | 2 ++ selfdrive/selfdrived/events.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/cereal/car.capnp b/cereal/car.capnp index cfaa2238c8..e80d64651b 100644 --- a/cereal/car.capnp +++ b/cereal/car.capnp @@ -115,6 +115,7 @@ struct OnroadEvent @0x9b1657f34caf3ad3 { actuatorsApiUnavailable @120; espActive @121; personalityChanged @122; + aeb @123; radarCanErrorDEPRECATED @15; communityFeatureDisallowedDEPRECATED @62; @@ -371,6 +372,7 @@ struct CarControl { pid @1; stopping @2; starting @3; + emergencyBraking @4; } } diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index d9c922bb90..471e46b88f 100755 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -388,6 +388,15 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { priority=Priority.LOWEST), }, + EventName.aeb: { + ET.PERMANENT: Alert( + "BRAKE!", + "Emergency Braking: Risk of Collision", + AlertStatus.critical, AlertSize.full, + Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 2.), + ET.NO_ENTRY: NoEntryAlert("AEB: Risk of Collision"), + }, + EventName.stockAeb: { ET.PERMANENT: Alert( "BRAKE!",