Skip to content

Commit

Permalink
ACC Fix - Python 3 (commaai#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
iHelp101 authored and BogGyver committed Oct 12, 2019
1 parent 923ba5c commit 75b7fd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/car/tesla/ACC_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ def _fast_decel_required(self, CS, lead_car):

def _seconds_to_collision(self, CS, lead_car):
if not lead_car or not lead_car.dRel:
return sys.maxint
return sys.maxsize
elif lead_car.vRel >= 0:
return sys.maxint
return sys.maxsize
return abs(float(lead_car.dRel) / lead_car.vRel)

def _get_cc_units_kph(self, is_imperial_units):
Expand Down

0 comments on commit 75b7fd0

Please sign in to comment.