mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-29 17:13:43 +08:00
Refactor steering angle logic for smoother control adjustments
Refactored the calculation and application of the steering angle to improve code clarity and ensure smoother transitions. Removed unused parameter update logic in `latcontrol_angle.py` and enhanced handling of driver overrides in `carcontroller.py`.
This commit is contained in:
+1
-1
Submodule opendbc_repo updated: e3196167d6...6f05e7d5a2
@@ -21,10 +21,10 @@ class LatControlAngle(LatControl):
|
||||
self.smoothing_factor_incr = 0.
|
||||
|
||||
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")):
|
||||
self.count = 0
|
||||
self.smoothing_factor_incr = float(smoothingFactorParam) / 10.0
|
||||
# self.count += 1
|
||||
# if self.count % 25 == 0 and (smoothingFactorParam := self.params.get("HkgTuningAngleSmoothingFactor")):
|
||||
# self.count = 0
|
||||
# self.smoothing_factor_incr = float(smoothingFactorParam) / 10.0
|
||||
|
||||
angle_log = log.ControlsState.LateralAngleState.new_message()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user