Browse Source

🐛 Fix extra E move in toolchange with ..._NO_RETURN (#22504)

Bob Anthony 2 years ago
parent
commit
53a5cd0c38
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/src/module/tool_change.cpp

+ 4
- 4
Marlin/src/module/tool_change.cpp View File

@@ -954,11 +954,11 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
954 954
       #if ENABLED(TOOLCHANGE_PARK)
955 955
         if (ok) {
956 956
           #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;
961 960
           #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)));
962 962
         }
963 963
       #endif
964 964
 

Loading…
Cancel
Save