Skip to content

Commit 5a8f087

Browse files
bob-anthonyptoal
authored andcommittedDec 16, 2021
🐛 Fix extra E move in toolchange with ..._NO_RETURN (MarlinFirmware#22504)
1 parent 7b364d9 commit 5a8f087

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎Marlin/src/module/tool_change.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -954,11 +954,11 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
954954
#if ENABLED(TOOLCHANGE_PARK)
955955
if (ok) {
956956
#if ENABLED(TOOLCHANGE_NO_RETURN)
957-
destination.set(current_position.x, current_position.y);
958-
prepare_internal_move_to_destination(planner.settings.max_feedrate_mm_s[Z_AXIS]);
959-
#else
960-
prepare_internal_move_to_destination(MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE));
957+
const float temp = destination.z;
958+
destination = current_position;
959+
destination.z = temp.z;
961960
#endif
961+
prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)));
962962
}
963963
#endif
964964

0 commit comments

Comments
 (0)