Scott Lahteine 6 years ago
parent
commit
a2a30ff0ac

+ 9
- 5
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -292,13 +292,17 @@
292 292
 
293 293
   void unified_bed_leveling::G29() {
294 294
 
295
-    if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
295
+    if (g29_parameter_parsing()) return; // Abort on parameter error
296
+
297
+    const int8_t p_val = parser.intval('P', -1);
298
+    const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J');
296 299
 
297 300
     // Check for commands that require the printer to be homed
298
-    if (axis_unhomed_error()) {
299
-      const int8_t p_val = parser.intval('P', -1);
300
-      if (p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'))
301
-        gcode.home_all_axes();
301
+    if (may_move) {
302
+      if (axis_unhomed_error()) gcode.home_all_axes();
303
+      #if ENABLED(DUAL_X_CARRIAGE)
304
+        if (active_extruder != 0) tool_change(0);
305
+      #endif
302 306
     }
303 307
 
304 308
     // Invalidate Mesh Points. This command is a little bit asymmetrical because

+ 4
- 0
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -268,6 +268,10 @@ void GcodeSuite::G29() {
268 268
    */
269 269
   if (!g29_in_progress) {
270 270
 
271
+    #if ENABLED(DUAL_X_CARRIAGE)
272
+      if (active_extruder != 0) tool_change(0);
273
+    #endif
274
+
271 275
     #if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR)
272 276
       abl_probe_index = -1;
273 277
     #endif

Loading…
Cancel
Save