Skip to content

Commit

Permalink
x_lead < 5 or (x_lead < 17.5 and self.v_rel < 0.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonGalaxy75 committed Dec 13, 2018
1 parent 6be3181 commit f1856be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def update(self, CS, lead, v_cruise_setpoint):

# Defining some variables to make the logic more human readable for auto distance override below
# Is the car tailgating the lead car?
if x_lead < 15 and self.v_rel >= -1 and self.v_rel < 1:
if x_lead < 5 or (x_lead < 17.5 and self.v_rel < 0.5):
self.tailgating = 1
else:
self.tailgating = 0
Expand Down

0 comments on commit f1856be

Please sign in to comment.