mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-17 10:42:07 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user