From 45d110830c5310dcd68ac2edf7ede85113fd8f30 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Thu, 3 Apr 2025 23:10:06 +0200 Subject: [PATCH] Fix typo in parameter access method. Replaced `self._params` with `self.params` to correctly access the parameter `HkgTuningAngleSmoothingFactor`. This ensures the smoothing factor is updated as intended during the control loop. --- selfdrive/controls/lib/latcontrol_angle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/latcontrol_angle.py b/selfdrive/controls/lib/latcontrol_angle.py index 1a0083df6b..026051cf16 100644 --- a/selfdrive/controls/lib/latcontrol_angle.py +++ b/selfdrive/controls/lib/latcontrol_angle.py @@ -22,7 +22,7 @@ class LatControlAngle(LatControl): def update(self, active, CS, VM, params, steer_limited_by_controls, desired_curvature, calibrated_pose, curvature_limited): self.count += 1 - if self.count % 25 == 0 and (smoothingFactorParam := self._params.get("HkgTuningAngleSmoothingFactor")): + if self.count % 25 == 0 and (smoothingFactorParam := self.params.get("HkgTuningAngleSmoothingFactor")): self.count = 0 self.smoothing_factor_incr = float(smoothingFactorParam) / 10.0