Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force T0 on UBL G29 for more than just Idex #16774

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "../../../gcode/gcode.h"
#include "../../../libs/least_squares_fit.h"

#if ENABLED(DUAL_X_CARRIAGE)
#if HOTENDS > 1
#include "../../../module/tool_change.h"
#endif

Expand Down Expand Up @@ -305,12 +305,15 @@

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');
#if HOTENDS > 1
const uint8_t old_tool_index = active_extruder;
#endif

// Check for commands that require the printer to be homed
if (may_move) {
planner.synchronize();
if (axes_need_homing()) gcode.home_all_axes();
#if ENABLED(DUAL_X_CARRIAGE)
#if HOTENDS > 1
if (active_extruder != 0) tool_change(0);
#endif
}
Expand Down Expand Up @@ -684,6 +687,9 @@
UNUSED(probe_deployed);
#endif

#if HOTENDS > 1
tool_change(old_tool_index);
#endif
return;
}

Expand Down