From 938759ebd1ea27c57e963b78015a2e93240f92f6 Mon Sep 17 00:00:00 2001 From: Armand du Parc Locmaria Date: Fri, 26 Apr 2024 20:04:10 -0700 Subject: [PATCH] commabody: ignore fcw alerts (#32301) * ignore modelV2 and longitudinalPlan on the body to avoid fcw alerts * move joystick_mode up because ignore depends on it * revert and ignore fcw itself instead old-commit-hash: adabd108e26767e6ed7ff6168d16742641281509 --- selfdrive/controls/controlsd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 72f1514d88..13d7b25b29 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -369,7 +369,7 @@ class Controls: stock_long_is_braking = self.enabled and not self.CP.openpilotLongitudinalControl and CS.aEgo < -1.25 model_fcw = self.sm['modelV2'].meta.hardBrakePredicted and not CS.brakePressed and not stock_long_is_braking planner_fcw = self.sm['longitudinalPlan'].fcw and self.enabled - if planner_fcw or model_fcw: + if (planner_fcw or model_fcw) and not (self.CP.notCar and self.joystick_mode): self.events.add(EventName.fcw) for m in messaging.drain_sock(self.log_sock, wait_for_one=False):