Add a Z raise-between-probes to G34 (#13791)

This commit is contained in:
Giuliano Zaro 2019-04-23 20:40:55 +02:00 committed by Scott Lahteine
parent 0f9c49ccba
commit e2dd2268e8

View File

@ -126,6 +126,12 @@ void GcodeSuite::G34() {
extruder_duplication_enabled = false;
#endif
// Before moving other axes raise Z, if needed. Never lower Z.
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before moving to probe pos) to ", Z_CLEARANCE_BETWEEN_PROBES);
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
}
// Remember corrections to determine errors on each iteration
float last_z_align_move[Z_STEPPER_COUNT] = ARRAY_N(Z_STEPPER_COUNT, 10000.0f, 10000.0f, 10000.0f),
z_measured[Z_STEPPER_COUNT] = { 0 };