From bb76d4f9e98dd5fbd742bd8bc4b594d92b448f10 Mon Sep 17 00:00:00 2001 From: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:07:52 -0400 Subject: [PATCH] Block Enhanced Speed Control events on unsupported platforms (#140) --- selfdrive/controls/lib/longitudinal_planner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index e99c809a00a501..54cc64e19a518a 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -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)