From 63ba5446085444af31e1d21bbadabf614619238c Mon Sep 17 00:00:00 2001 From: bob-anthony <42719046+bob-anthony@users.noreply.github.com> Date: Tue, 3 Aug 2021 12:53:09 -0500 Subject: [PATCH 1/3] Fixed unexpected extruder move on tool change When "changing" tools with TOOLCHANGE_FS_PRIME_FIRST_USED enabled, an unexpected extruder move would happen at the end of the tool change. --- Marlin/src/module/tool_change.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 5b478caa1a99..6aa960447281 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -954,7 +954,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. #if ENABLED(TOOLCHANGE_PARK) if (ok) { #if ENABLED(TOOLCHANGE_NO_RETURN) - destination.set(current_position.x, current_position.y); + destination.set(current_position.x, current_position.y, current_position.z, current_position.e); prepare_internal_move_to_destination(planner.settings.max_feedrate_mm_s[Z_AXIS]); #else prepare_internal_move_to_destination(MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); From 8d079645896d62c3bbb1480b5f8167872d558dad Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 3 Aug 2021 23:02:16 -0500 Subject: [PATCH 2/3] Update tool_change.cpp --- Marlin/src/module/tool_change.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 6aa960447281..f726f6ac3653 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -954,7 +954,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. #if ENABLED(TOOLCHANGE_PARK) if (ok) { #if ENABLED(TOOLCHANGE_NO_RETURN) - destination.set(current_position.x, current_position.y, current_position.z, current_position.e); + destination = current_position; prepare_internal_move_to_destination(planner.settings.max_feedrate_mm_s[Z_AXIS]); #else prepare_internal_move_to_destination(MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); From 4e80d458c96607978e190d282e130858a1827b91 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 3 Aug 2021 23:23:54 -0500 Subject: [PATCH 3/3] Preserve Z motion --- Marlin/src/module/tool_change.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index f726f6ac3653..6d69b8722dde 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -954,11 +954,11 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. #if ENABLED(TOOLCHANGE_PARK) if (ok) { #if ENABLED(TOOLCHANGE_NO_RETURN) + const float temp = destination.z; destination = current_position; - prepare_internal_move_to_destination(planner.settings.max_feedrate_mm_s[Z_AXIS]); - #else - prepare_internal_move_to_destination(MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); + destination.z = temp.z; #endif + prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE))); } #endif