Don't raise Z if only homing Z
This commit is contained in:
parent
0b6f8f8244
commit
4036c73cdd
@ -2914,27 +2914,29 @@ inline void gcode_G28() {
|
|||||||
|
|
||||||
#elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
|
#elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
|
||||||
|
|
||||||
// Raise Z before homing, if specified
|
// Raise Z before homing X or Y, if specified
|
||||||
float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
|
if (home_all_axis || homeX || homeY) {
|
||||||
if (z_dest > current_position[Z_AXIS]) {
|
float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
|
||||||
|
if (z_dest > current_position[Z_AXIS]) {
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) {
|
if (DEBUGGING(LEVELING)) {
|
||||||
SERIAL_ECHOPAIR("Raise Z (before homing) to ", z_dest);
|
SERIAL_ECHOPAIR("Raise Z (before homing) to ", z_dest);
|
||||||
SERIAL_EOL;
|
SERIAL_EOL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
feedrate = homing_feedrate[Z_AXIS];
|
feedrate = homing_feedrate[Z_AXIS];
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
do_blocking_move_to_z(z_dest);
|
do_blocking_move_to_z(z_dest);
|
||||||
#else
|
#else
|
||||||
line_to_z(z_dest);
|
line_to_z(z_dest);
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
destination[Z_AXIS] = current_position[Z_AXIS] = z_dest;
|
destination[Z_AXIS] = current_position[Z_AXIS] = z_dest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // MIN_Z_HEIGHT_FOR_HOMING
|
#endif // MIN_Z_HEIGHT_FOR_HOMING
|
||||||
|
Loading…
Reference in New Issue
Block a user