From 1ec7c65758e072ac2596ad82fb8aef8aa256e0a2 Mon Sep 17 00:00:00 2001 From: Comma Device Date: Thu, 20 Aug 2026 14:40:12 +0800 Subject: [PATCH] longitudinal_planner: use output_a_target in update_targets (align with upstream #38653 rework) --- openpilot/selfdrive/controls/lib/longitudinal_planner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpilot/selfdrive/controls/lib/longitudinal_planner.py b/openpilot/selfdrive/controls/lib/longitudinal_planner.py index ca3d44b5e..bf91c5e1f 100755 --- a/openpilot/selfdrive/controls/lib/longitudinal_planner.py +++ b/openpilot/selfdrive/controls/lib/longitudinal_planner.py @@ -112,8 +112,8 @@ class LongitudinalPlanner(LongitudinalPlannerSP): # No change cost when user is controlling the speed, or when standstill prev_accel_constraint = not (reset_state or sm['carState'].standstill) - # Get new v_cruise and a_desired from Smart Cruise Control and Speed Limit Assist - v_cruise, self.a_desired = LongitudinalPlannerSP.update_targets(self, sm, self.v_desired_filter.x, self.a_desired, v_cruise) + # Get new v_cruise and a_target from Smart Cruise Control and Speed Limit Assist + v_cruise, self.output_a_target = LongitudinalPlannerSP.update_targets(self, sm, self.v_desired_filter.x, self.output_a_target, v_cruise) self.mpc.set_weights(prev_accel_constraint, personality=sm['selfdriveState'].personality) self.mpc.set_cur_state(self.v_desired_filter.x, self.output_a_target)