Longcontrol: fix possible reference before assignment (#25715)

fix possible reference before assignment
This commit is contained in:
Shane Smiskol
2022-09-08 21:43:04 -07:00
committed by GitHub
parent 4974ca03a8
commit 056b2ec2ed
+1 -1
View File
@@ -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