Skip to content

Commit 5ad11b2

Browse files
author
David Abrahams
committed
ACC: disable on brakes or slowing below min speed
1 parent d56e44b commit 5ad11b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

selfdrive/car/tesla/ACC_module.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def _current_time_millis():
1717
class ACCController(object):
1818

1919
# Tesla cruise only functions above 17 MPH
20-
MIN_CRUISE_SPEED_MS = 17.5 * CV.MPH_TO_MS
20+
MIN_CRUISE_SPEED_MS = 17.1 * CV.MPH_TO_MS
2121

2222
def __init__(self):
2323
self.human_cruise_action_time = 0
@@ -86,8 +86,9 @@ def update_stat(self, CS, enabled):
8686
if CS.v_ego < self.MIN_CRUISE_SPEED_MS:
8787
self.has_gone_below_min_speed = True
8888

89-
# If autoresume is not enabled, manually steering disables ACC.
90-
if not (enabled or self.autoresume):
89+
# If autoresume is not enabled, manually steering or slowing disables ACC.
90+
if not self.autoresume:
91+
if not enabled or self.user_has_braked or self.has_gone_below_min_speed:
9192
self.enable_adaptive_cruise = False
9293

9394
# Notify if ACC was toggled

0 commit comments

Comments
 (0)