diff --git a/selfdrive/controls/lib/long_mpc.py b/selfdrive/controls/lib/long_mpc.py index 15d842b4e08d0a..55d5570b3917ff 100644 --- a/selfdrive/controls/lib/long_mpc.py +++ b/selfdrive/controls/lib/long_mpc.py @@ -134,7 +134,7 @@ def update(self, CS, lead, v_cruise_setpoint): else: TR = ONE_BAR_DISTANCE if CS.carState.readdistancelines != self.lastTR: - self.libmpc.init(MPC_COST_LONG.TTC, 1.0, MPC_COST_LONG.ACCELERATION, MPC_COST_LONG.JERK) + self.libmpc.init(MPC_COST_LONG.TTC, MPC_COST_LONG.DISTANCE, MPC_COST_LONG.ACCELERATION, MPC_COST_LONG.JERK) self.lastTR = CS.carState.readdistancelines elif CS.carState.readdistancelines == 2: