Fix usage, commentary of MANUAL_PROBE_START_Z, Z_AFTER_PROBING (#21692)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
pinchies
2021-04-25 18:48:20 +10:00
committed by GitHub
parent a280077820
commit a1ee5124d3
6 changed files with 52 additions and 38 deletions

View File

@ -100,7 +100,11 @@ void GcodeSuite::G29() {
// For each G29 S2...
if (mbl_probe_index == 0) {
// Move close to the bed before the first point
do_blocking_move_to_z(MANUAL_PROBE_START_Z);
do_blocking_move_to_z(0.4f
#ifdef MANUAL_PROBE_START_Z
+ (MANUAL_PROBE_START_Z) - 0.4f
#endif
);
}
else {
// Save Z for the previous mesh position
@ -116,8 +120,14 @@ void GcodeSuite::G29() {
_manual_goto_xy({ mbl.index_to_xpos[ix], mbl.index_to_ypos[iy] });
}
else {
// One last "return to the bed" (as originally coded) at completion
current_position.z = MANUAL_PROBE_HEIGHT;
// Move to the after probing position
current_position.z = (
#ifdef Z_AFTER_PROBING
Z_AFTER_PROBING
#else
Z_CLEARANCE_BETWEEN_MANUAL_PROBES
#endif
);
line_to_current_position();
planner.synchronize();