浏览代码

[1.1.x] Tool change bad behaviour fix

Just aligned with version 2.0. Here bug was not present
GMagician 7 年前
父节点
当前提交
7a5b3a1e6a
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7
    7
      Marlin/Marlin_main.cpp

+ 7
- 7
Marlin/Marlin_main.cpp 查看文件

11121
         SYNC_PLAN_POSITION_KINEMATIC();
11121
         SYNC_PLAN_POSITION_KINEMATIC();
11122
 
11122
 
11123
         // Move to the "old position" (move the extruder into place)
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
         if (!no_move && IsRunning()) {
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
           #if ENABLED(DEBUG_LEVELING_FEATURE)
11128
           #if ENABLED(DEBUG_LEVELING_FEATURE)
11130
             if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
11129
             if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
11131
           #endif
11130
           #endif
11133
           do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
11132
           do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
11134
         }
11133
         }
11135
         #if ENABLED(SWITCHING_NOZZLE)
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
         #endif
11139
         #endif
11140
       } // (tmp_extruder != active_extruder)
11140
       } // (tmp_extruder != active_extruder)
11141
 
11141
 

正在加载...
取消
保存