mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 16:32:06 +08:00
Longcontrol: fix possible reference before assignment (#25715)
fix possible reference before assignment
This commit is contained in:
@@ -92,6 +92,7 @@ class LongControl:
|
||||
v_target_1sec = interp(self.CP.longitudinalActuatorDelayUpperBound + t_since_plan + 1.0, T_IDXS[:CONTROL_N], speeds)
|
||||
else:
|
||||
v_target = 0.0
|
||||
v_target_now = 0.0
|
||||
v_target_1sec = 0.0
|
||||
a_target = 0.0
|
||||
|
||||
@@ -132,7 +133,6 @@ class LongControl:
|
||||
feedforward=a_target,
|
||||
freeze_integrator=freeze_integrator)
|
||||
|
||||
|
||||
self.last_output_accel = clip(output_accel, accel_limits[0], accel_limits[1])
|
||||
|
||||
return self.last_output_accel
|
||||
|
||||
Reference in New Issue
Block a user