[1.1.x] Fix planner computation (#11709)

#11708 counterpart
This commit is contained in:
Giuliano Zaro 2018-09-03 07:29:13 +02:00 committed by Scott Lahteine
parent 8193c61ac9
commit 5e0cd14bde
1 changed files with 2 additions and 2 deletions

View File

@ -2574,11 +2574,11 @@ void Planner::set_position_mm(const AxisEnum axis, const float &v) {
#else
const uint8_t axis_index = axis;
#endif
position[axis] = LROUND(axis_steps_per_mm[axis_index] * (v +
position[axis] = LROUND(axis_steps_per_mm[axis_index] * (v + (
#if ENABLED(AUTO_BED_LEVELING_UBL)
axis == Z_AXIS && leveling_active ? ubl.get_z_correction(current_position[X_AXIS], current_position[Y_AXIS]) :
#endif
0
0)
));
#if HAS_POSITION_FLOAT
position_float[axis] = v;