Skip to content

Commit

Permalink
Block Enhanced Speed Control events on unsupported platforms (commaai…
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyhaibin committed Mar 25, 2023
1 parent 38068dc commit bb76d4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions selfdrive/controls/lib/longitudinal_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ def update(self, sm):
v_cruise = 0.0

# Get acceleration and active solutions for custom long mpc.
self.cruise_source, a_min_sol, v_cruise_sol = self.cruise_solutions(not reset_state, self.v_desired_filter.x,
self.a_desired, v_cruise, sm)
self.cruise_source, a_min_sol, v_cruise_sol = self.cruise_solutions(
not reset_state and self.CP.openpilotLongitudinalControl, self.v_desired_filter.x,
self.a_desired, v_cruise, sm)

# clip limits, cannot init MPC outside of bounds
accel_limits_turns[0] = min(accel_limits_turns[0], self.a_desired + 0.05, a_min_sol)
Expand Down

0 comments on commit bb76d4f

Please sign in to comment.