Move G29 3-point startup earlier

This commit is contained in:
Scott Lahteine 2020-12-05 19:57:50 -06:00 committed by Scott Lahteine
parent 284cc8f62d
commit 4b6fa1b54d

View File

@ -394,6 +394,11 @@ G29_TYPE GcodeSuite::G29() {
planner.synchronize(); planner.synchronize();
#if ENABLED(AUTO_BED_LEVELING_3POINT)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
#endif
if (!faux) remember_feedrate_scaling_off(); if (!faux) remember_feedrate_scaling_off();
// Disable auto bed leveling during G29. // Disable auto bed leveling during G29.
@ -411,7 +416,6 @@ G29_TYPE GcodeSuite::G29() {
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (TERN1(PROBE_MANUALLY, !no_action) if (TERN1(PROBE_MANUALLY, !no_action)
&& (gridSpacing != bilinear_grid_spacing || probe_position_lf != bilinear_start) && (gridSpacing != bilinear_grid_spacing || probe_position_lf != bilinear_start)
) { ) {
@ -425,18 +429,8 @@ G29_TYPE GcodeSuite::G29() {
// Can't re-enable (on error) until the new grid is written // Can't re-enable (on error) until the new grid is written
abl_should_enable = false; abl_should_enable = false;
} }
#endif // AUTO_BED_LEVELING_BILINEAR #endif // AUTO_BED_LEVELING_BILINEAR
#if ENABLED(AUTO_BED_LEVELING_3POINT)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
// Probe at 3 arbitrary points
points[0].z = points[1].z = points[2].z = 0;
#endif // AUTO_BED_LEVELING_3POINT
} // !g29_in_progress } // !g29_in_progress
#if ENABLED(PROBE_MANUALLY) #if ENABLED(PROBE_MANUALLY)