Fix set_current_from_steppers_for_axis(E_AXIS) bug

2.0.x
Scott Lahteine 5 years ago
parent c4db8e49a7
commit edd1b76a9a

@ -272,20 +272,21 @@ void get_cartesian_from_steppers() {
*/
void set_current_from_steppers_for_axis(const AxisEnum axis) {
get_cartesian_from_steppers();
xyze_pos_t pos = cartes;
pos.e = planner.get_axis_position_mm(E_AXIS);
#if HAS_POSITION_MODIFIERS
xyze_pos_t pos = { cartes.x, cartes.y, cartes.z, current_position.e };
planner.unapply_modifiers(pos
#if HAS_LEVELING
, true
#endif
);
const xyze_pos_t &cartes = pos;
#endif
if (axis == ALL_AXES)
current_position = cartes;
current_position = pos;
else
current_position[axis] = cartes[axis];
current_position[axis] = pos[axis];
}
/**

Loading…
Cancel
Save