Skip to content

Commit

Permalink
Fix braking issue when changing from 4 to 1 bar
Browse files Browse the repository at this point in the history
  • Loading branch information
kegman authored Apr 26, 2019
1 parent a306303 commit bcb4ef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/long_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bcb4ef7

Please sign in to comment.