InsanityAutomation
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
2 deletions
-
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
|
@ -38,7 +38,7 @@ |
|
|
#include "../../../gcode/gcode.h" |
|
|
#include "../../../gcode/gcode.h" |
|
|
#include "../../../libs/least_squares_fit.h" |
|
|
#include "../../../libs/least_squares_fit.h" |
|
|
|
|
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
#if HOTENDS > 1 |
|
|
#include "../../../module/tool_change.h" |
|
|
#include "../../../module/tool_change.h" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
@ -305,12 +305,15 @@ |
|
|
|
|
|
|
|
|
const int8_t p_val = parser.intval('P', -1); |
|
|
const int8_t p_val = parser.intval('P', -1); |
|
|
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'); |
|
|
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'); |
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
|
|
const uint8_t old_tool_index = active_extruder; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// Check for commands that require the printer to be homed
|
|
|
// Check for commands that require the printer to be homed
|
|
|
if (may_move) { |
|
|
if (may_move) { |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
if (axes_need_homing()) gcode.home_all_axes(); |
|
|
if (axes_need_homing()) gcode.home_all_axes(); |
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
#if HOTENDS > 1 |
|
|
if (active_extruder != 0) tool_change(0); |
|
|
if (active_extruder != 0) tool_change(0); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
@ -684,6 +687,9 @@ |
|
|
UNUSED(probe_deployed); |
|
|
UNUSED(probe_deployed); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
|
|
tool_change(old_tool_index); |
|
|
|
|
|
#endif |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|