1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 20:18:52 +00:00

Tweak MBL move close to bed

This commit is contained in:
Scott Lahteine 2018-04-12 22:41:21 -05:00
parent 5274ab0ad5
commit e3c2d43b2b

View File

@ -4258,6 +4258,8 @@ void home_all_axes() { gcode_G28(true); }
// For the initial G29 S2 save software endstop state // For the initial G29 S2 save software endstop state
enable_soft_endstops = soft_endstops_enabled; enable_soft_endstops = soft_endstops_enabled;
#endif #endif
// Move close to the bed before the first point
do_blocking_move_to_z(Z_MIN_POS);
} }
else { else {
// For G29 S2 after adjusting Z. // For G29 S2 after adjusting Z.
@ -4268,22 +4270,14 @@ void home_all_axes() { gcode_G28(true); }
} }
// If there's another point to sample, move there with optional lift. // If there's another point to sample, move there with optional lift.
if (mbl_probe_index < GRID_MAX_POINTS) { if (mbl_probe_index < GRID_MAX_POINTS) {
mbl.zigzag(mbl_probe_index, px, py);
_manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
#if HAS_SOFTWARE_ENDSTOPS #if HAS_SOFTWARE_ENDSTOPS
// Disable software endstops to allow manual adjustment // Disable software endstops to allow manual adjustment
// If G29 is not completed, they will not be re-enabled // If G29 is not completed, they will not be re-enabled
soft_endstops_enabled = false; soft_endstops_enabled = false;
#endif #endif
// Move close to the bed for the first point mbl.zigzag(mbl_probe_index++, px, py);
if (!mbl_probe_index) { _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
current_position[Z_AXIS] = Z_MIN_POS;
buffer_line_to_current_position();
}
mbl_probe_index++;
} }
else { else {
// One last "return to the bed" (as originally coded) at completion // One last "return to the bed" (as originally coded) at completion