1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

Use Tool 0 for Dual X Axis G29

See https://github.com/MarlinFirmware/Marlin/issues/5597#issuecomment-397683325
This commit is contained in:
Scott Lahteine 2018-06-19 22:54:30 -05:00
parent e0b4abd3eb
commit 3bb332b440
2 changed files with 13 additions and 5 deletions

View File

@ -4701,6 +4701,10 @@ void home_all_axes() { gcode_G28(true); }
*/
if (!g29_in_progress) {
#if ENABLED(DUAL_X_CARRIAGE)
if (active_extruder != 0) tool_change(0);
#endif
#if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR)
abl_probe_index = -1;
#endif

View File

@ -289,13 +289,17 @@
void unified_bed_leveling::G29() {
if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
if (g29_parameter_parsing()) return; // Abort on parameter error
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');
// Check for commands that require the printer to be homed
if (axis_unhomed_error()) {
const int8_t p_val = parser.intval('P', -1);
if (p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'))
home_all_axes();
if (may_move) {
if (axis_unhomed_error()) home_all_axes();
#if ENABLED(DUAL_X_CARRIAGE)
if (active_extruder != 0) tool_change(0);
#endif
}
// Invalidate Mesh Points. This command is a little bit asymmetrical because