Skip to content

Commit

Permalink
Move G29 3-point startup earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and chrisjenda committed Apr 11, 2021
1 parent 7a63085 commit d780350
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ G29_TYPE GcodeSuite::G29() {

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();

// Disable auto bed leveling during G29.
Expand All @@ -411,7 +416,6 @@ G29_TYPE GcodeSuite::G29() {
#endif

#if ENABLED(AUTO_BED_LEVELING_BILINEAR)

if (TERN1(PROBE_MANUALLY, !no_action)
&& (gridSpacing != bilinear_grid_spacing || probe_position_lf != bilinear_start)
) {
Expand All @@ -425,18 +429,8 @@ G29_TYPE GcodeSuite::G29() {
// Can't re-enable (on error) until the new grid is written
abl_should_enable = false;
}

#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

#if ENABLED(PROBE_MANUALLY)
Expand Down

0 comments on commit d780350

Please sign in to comment.