Browse Source

Fix set_current_from_steppers_for_axis(E_AXIS) bug

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
edd1b76a9a
  1. 9
      Marlin/src/module/motion.cpp

9
Marlin/src/module/motion.cpp

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

Loading…
Cancel
Save