From 7a5b3a1e6ae2910a3a3e46fc6ba1ba6d29d460f1 Mon Sep 17 00:00:00 2001 From: GMagician Date: Wed, 22 Nov 2017 23:51:07 +0100 Subject: [PATCH] [1.1.x] Tool change bad behaviour fix Just aligned with version 2.0. Here bug was not present --- Marlin/Marlin_main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index cfa0f41e2..c9558bc0d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -11121,11 +11121,10 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n SYNC_PLAN_POSITION_KINEMATIC(); // Move to the "old position" (move the extruder into place) + #if ENABLED(SWITCHING_NOZZLE) + destination[Z_AXIS] += z_diff; // Include the Z restore with the "move back" + #endif if (!no_move && IsRunning()) { - #if ENABLED(SWITCHING_NOZZLE) - if (z_raise != z_diff) - destination[Z_AXIS] += z_diff; // Include the Z restore with the "move back" - #endif #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination); #endif @@ -11133,9 +11132,10 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]); } #if ENABLED(SWITCHING_NOZZLE) - // Move back down, if needed. (Including when the new tool is higher.) - else if (z_raise != z_diff) - do_blocking_move_to_z(destination[Z_AXIS] + z_diff, planner.max_feedrate_mm_s[Z_AXIS]); + else { + // Move back down. (Including when the new tool is higher.) + do_blocking_move_to_z(destination[Z_AXIS], planner.max_feedrate_mm_s[Z_AXIS]); + } #endif } // (tmp_extruder != active_extruder)