From a3db53044ef17e4c04d0d86d23d86ab06d2e161a Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Thu, 16 Jan 2025 12:00:20 -0500 Subject: [PATCH] fix wrong typing and variable name --- sunnypilot/selfdrive/controls/lib/dec/dec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sunnypilot/selfdrive/controls/lib/dec/dec.py b/sunnypilot/selfdrive/controls/lib/dec/dec.py index f7bc028ee4..dc9a94543d 100644 --- a/sunnypilot/selfdrive/controls/lib/dec/dec.py +++ b/sunnypilot/selfdrive/controls/lib/dec/dec.py @@ -173,8 +173,8 @@ class DynamicExperimentalController: """ Smoothing the lead detection to avoid erratic behavior. """ - self._has_lead_filtered = (1 - smoothing_factor) * self._has_lead_filtered + smoothing_factor * lead_prob - return self._has_lead_filtered > WMACConstants.LEAD_PROB + lead_filtering: float = (1 - smoothing_factor) * self._has_lead_filtered + smoothing_factor * lead_prob + return lead_filtering > WMACConstants.LEAD_PROB def _adaptive_lead_prob_threshold(self) -> float: """