Skip to content

Commit

Permalink
only allow INDI wind down on user override (#20080)
Browse files Browse the repository at this point in the history
old-commit-hash: 280192e
  • Loading branch information
pd0wm authored Feb 24, 2021
1 parent ee42cd8 commit ddc9551
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions selfdrive/controls/lib/latcontrol_indi.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def update(self, active, CS, CP, lat_plan):
g_inv = 1. / self.G
delta_u = g_inv * accel_error

# If steering pressed, only allow wind down
if CS.steeringPressed and (delta_u * self.output_steer > 0):
delta_u = 0

# Enforce rate limit
if self.enforce_rate_limit:
steer_max = float(CarControllerParams.STEER_MAX)
Expand Down

0 comments on commit ddc9551

Please sign in to comment.