Explorar el Código

[1.1.x] Tool change bad behaviour fix

Just aligned with version 2.0. Here bug was not present
GMagician hace 6 años
padre
commit
7a5b3a1e6a
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7
    7
      Marlin/Marlin_main.cpp

+ 7
- 7
Marlin/Marlin_main.cpp Ver fichero

@@ -11121,11 +11121,10 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
11121 11121
         SYNC_PLAN_POSITION_KINEMATIC();
11122 11122
 
11123 11123
         // Move to the "old position" (move the extruder into place)
11124
+        #if ENABLED(SWITCHING_NOZZLE)
11125
+          destination[Z_AXIS] += z_diff;  // Include the Z restore with the "move back"
11126
+        #endif
11124 11127
         if (!no_move && IsRunning()) {
11125
-          #if ENABLED(SWITCHING_NOZZLE)
11126
-            if (z_raise != z_diff)
11127
-              destination[Z_AXIS] += z_diff;  // Include the Z restore with the "move back"
11128
-          #endif
11129 11128
           #if ENABLED(DEBUG_LEVELING_FEATURE)
11130 11129
             if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
11131 11130
           #endif
@@ -11133,9 +11132,10 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
11133 11132
           do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
11134 11133
         }
11135 11134
         #if ENABLED(SWITCHING_NOZZLE)
11136
-          // Move back down, if needed. (Including when the new tool is higher.)
11137
-          else if (z_raise != z_diff)
11138
-            do_blocking_move_to_z(destination[Z_AXIS] + z_diff, planner.max_feedrate_mm_s[Z_AXIS]);
11135
+          else {
11136
+            // Move back down. (Including when the new tool is higher.)
11137
+            do_blocking_move_to_z(destination[Z_AXIS], planner.max_feedrate_mm_s[Z_AXIS]);
11138
+          }
11139 11139
         #endif
11140 11140
       } // (tmp_extruder != active_extruder)
11141 11141
 

Loading…
Cancelar
Guardar