Skip to content

Commit

Permalink
Use meters for Global ACC Close_Distance
Browse files Browse the repository at this point in the history
  • Loading branch information
martinl committed May 7, 2022
1 parent 3c13b74 commit ec42568
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions selfdrive/car/subaru/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def update(self, c, CS, frame, actuators, pcm_cancel_cmd, visual_alert, left_lin
if (enabled # ACC active
and CS.car_follow == 1 # lead car
and CS.out.standstill # must be standing still
and CS.close_distance > 3 # acc resume trigger threshold
and CS.close_distance < 4.5 # max operating distance to filter false positives
and CS.close_distance > 3 # acc resume min trigger threshold (m)
and CS.close_distance < 4.5 # acc resume max trigger threshold (m)
and CS.close_distance > self.prev_close_distance): # distance with lead car is increasing
self.sng_acc_resume = True
elif CS.CP.carFingerprint not in PREGLOBAL_CARS:
Expand All @@ -71,8 +71,8 @@ def update(self, c, CS, frame, actuators, pcm_cancel_cmd, visual_alert, left_lin
and CS.car_follow == 1 # lead car
and CS.cruise_state == 3 # ACC HOLD (only with EPB)
and CS.out.standstill # must be standing still
and CS.close_distance > 150 # acc resume trigger threshold
and CS.close_distance < 255 # ignore max value
and CS.close_distance > 3 # acc resume min trigger threshold (m)
and CS.close_distance < 4.5 # acc resume max trigger threshold (m)
and CS.close_distance > self.prev_close_distance): # distance with lead car is increasing
self.sng_acc_resume = True
self.prev_cruise_state = CS.cruise_state
Expand Down

0 comments on commit ec42568

Please sign in to comment.