Apply MIN_Z_HEIGHT_FOR_HOMING raise literally

2.0.x
Scott Lahteine 9 years ago
parent 177ec20bf0
commit 0b6f8f8244

@ -2915,22 +2915,27 @@ 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, if specified
destination[Z_AXIS] = (current_position[Z_AXIS] += MIN_Z_HEIGHT_FOR_HOMING); float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
#if ENABLED(DEBUG_LEVELING_FEATURE) if (z_dest > current_position[Z_AXIS]) {
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
SERIAL_EOL;
}
#endif
feedrate = homing_feedrate[Z_AXIS]; #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("Raise Z (before homing) to ", z_dest);
SERIAL_EOL;
}
#endif
#if HAS_BED_PROBE feedrate = homing_feedrate[Z_AXIS];
do_blocking_move_to_z(destination[Z_AXIS]);
#else #if HAS_BED_PROBE
line_to_z(destination[Z_AXIS]); do_blocking_move_to_z(z_dest);
stepper.synchronize(); #else
#endif line_to_z(z_dest);
stepper.synchronize();
#endif
destination[Z_AXIS] = current_position[Z_AXIS] = z_dest;
}
#endif // MIN_Z_HEIGHT_FOR_HOMING #endif // MIN_Z_HEIGHT_FOR_HOMING

Loading…
Cancel
Save