Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed May 19, 2022
1 parent 59459ed commit 03dd12c
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ G29_TYPE GcodeSuite::G29() {

#endif

abl.reenable = false; // Don't re-enable after modifying the mesh
idle_no_sleep();

} // inner
Expand Down Expand Up @@ -916,22 +917,17 @@ G29_TYPE GcodeSuite::G29() {
}

// Auto Bed Leveling is complete! Enable if possible.
planner.leveling_active = !abl.dryrun || abl.reenable;
// Sync the planner from the current_position
if (planner.leveling_active) sync_plan_position();

#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)

if (!abl.dryrun || abl.reenable) {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("G29 uncorrected Z:", current_position.z);
planner.leveling_active = true;
sync_plan_position();
}

// Auto Bed Leveling is complete! Enable if possible.
set_bed_leveling_enabled(true);
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)

if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" corrected Z:", current_position.z);
}
// Auto Bed Leveling is complete! Enable if possible.
if (!abl.dryrun || abl.reenable) set_bed_leveling_enabled(true);

#endif // ABL_PLANAR
#endif

} // !isnan(abl.measured_z)

Expand Down

0 comments on commit 03dd12c

Please sign in to comment.