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: adabd108e2
pull/32199/head
Armand du Parc Locmaria 1 year ago committed by GitHub
parent 38c10a672a
commit 938759ebd1
  1. 2
      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 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 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 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) self.events.add(EventName.fcw)
for m in messaging.drain_sock(self.log_sock, wait_for_one=False): for m in messaging.drain_sock(self.log_sock, wait_for_one=False):

Loading…
Cancel
Save