Bläddra i källkod

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

Bob Anthony 3 år sedan
förälder
incheckning
53a5cd0c38
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4
    4
      Marlin/src/module/tool_change.cpp

+ 4
- 4
Marlin/src/module/tool_change.cpp Visa fil

954
       #if ENABLED(TOOLCHANGE_PARK)
954
       #if ENABLED(TOOLCHANGE_PARK)
955
         if (ok) {
955
         if (ok) {
956
           #if ENABLED(TOOLCHANGE_NO_RETURN)
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
           #endif
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
       #endif
963
       #endif
964
 
964
 

Laddar…
Avbryt
Spara