Skip to content

Commit

Permalink
making latcontrol_pid.py not only for Tesla
Browse files Browse the repository at this point in the history
  • Loading branch information
BogGyver committed Apr 24, 2020
1 parent 18dbf4c commit 1c9de65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selfdrive/controls/lib/latcontrol_pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ def update(self, active, v_ego, angle_steers, angle_steers_rate, eps_torque, ste


# we only deal with Tesla, so we return two angles, no torque info
return float(self.angle_steers_des), path_plan.angleSteers, pid_log
if CP.carName == "tesla":
return float(self.angle_steers_des), path_plan.angleSteers, pid_log
else:
return output_steer, float(self.angle_steers_des), pid_log

0 comments on commit 1c9de65

Please sign in to comment.