浏览代码

Force T0 in UBL G29 on all multi-hotend setups (#16774)

InsanityAutomation 4 年前
父节点
当前提交
62d9e3f50e
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+ 8
- 2
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

38
   #include "../../../gcode/gcode.h"
38
   #include "../../../gcode/gcode.h"
39
   #include "../../../libs/least_squares_fit.h"
39
   #include "../../../libs/least_squares_fit.h"
40
 
40
 
41
-  #if ENABLED(DUAL_X_CARRIAGE)
41
+  #if HOTENDS > 1
42
     #include "../../../module/tool_change.h"
42
     #include "../../../module/tool_change.h"
43
   #endif
43
   #endif
44
 
44
 
305
 
305
 
306
     const int8_t p_val = parser.intval('P', -1);
306
     const int8_t p_val = parser.intval('P', -1);
307
     const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J');
307
     const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J');
308
+    #if HOTENDS > 1
309
+      const uint8_t old_tool_index = active_extruder;
310
+    #endif
308
 
311
 
309
     // Check for commands that require the printer to be homed
312
     // Check for commands that require the printer to be homed
310
     if (may_move) {
313
     if (may_move) {
311
       planner.synchronize();
314
       planner.synchronize();
312
       if (axes_need_homing()) gcode.home_all_axes();
315
       if (axes_need_homing()) gcode.home_all_axes();
313
-      #if ENABLED(DUAL_X_CARRIAGE)
316
+      #if HOTENDS > 1
314
         if (active_extruder != 0) tool_change(0);
317
         if (active_extruder != 0) tool_change(0);
315
       #endif
318
       #endif
316
     }
319
     }
684
       UNUSED(probe_deployed);
687
       UNUSED(probe_deployed);
685
     #endif
688
     #endif
686
 
689
 
690
+    #if HOTENDS > 1
691
+      tool_change(old_tool_index);
692
+    #endif
687
     return;
693
     return;
688
   }
694
   }
689
 
695
 

正在加载...
取消
保存