Scott Lahteine 7 years ago
parent
commit
a2a30ff0ac
  1. 14
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  2. 4
      Marlin/src/gcode/bedlevel/abl/G29.cpp

14
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

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

4
Marlin/src/gcode/bedlevel/abl/G29.cpp

@ -268,6 +268,10 @@ void GcodeSuite::G29() {
*/ */
if (!g29_in_progress) { 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) #if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR)
abl_probe_index = -1; abl_probe_index = -1;
#endif #endif

Loading…
Cancel
Save