Don't raise Z if only homing Z

This commit is contained in:
Scott Lahteine 2016-07-07 12:28:23 -07:00
parent 0b6f8f8244
commit 4036c73cdd

View File

@ -2914,7 +2914,8 @@ 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
if (home_all_axis || homeX || homeY) {
float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING; float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
if (z_dest > current_position[Z_AXIS]) { if (z_dest > current_position[Z_AXIS]) {
@ -2936,6 +2937,7 @@ inline void gcode_G28() {
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