From 5e798af4a11033f4d1e1a36ec91c4d9ecc22fb71 Mon Sep 17 00:00:00 2001 From: Kumar <36933347+rav4kumar@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:41:52 -0700 Subject: [PATCH] Update dynamic_experimental_controller.py --- .../lib/sunnypilot/dynamic_experimental_controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/sunnypilot/dynamic_experimental_controller.py b/selfdrive/controls/lib/sunnypilot/dynamic_experimental_controller.py index 46291b0391..f064d22434 100644 --- a/selfdrive/controls/lib/sunnypilot/dynamic_experimental_controller.py +++ b/selfdrive/controls/lib/sunnypilot/dynamic_experimental_controller.py @@ -196,8 +196,9 @@ class DynamicExperimentalController: # lead detection with smoothing self._lead_gmac.add_data(lead_one.status) - lead_prob = self._lead_gmac.get_weighted_average() or 0 - self._has_lead_filtered = self._smoothed_lead_detection(lead_prob) + self._has_lead_filtered = self._lead_gmac.get_weighted_average() > LEAD_PROB + #lead_prob = self._lead_gmac.get_weighted_average() or 0 + #self._has_lead_filtered = self._smoothed_lead_detection(lead_prob) # adaptive slow down detection adaptive_threshold = self._adaptive_slowdown_threshold()