|
@@ -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
|