Apply Z_RAISE_BEFORE_HOMING before homing XY

2.0.x
Scott Lahteine 10 years ago
parent baa6787393
commit 8500c80b33

@ -1803,7 +1803,19 @@ inline void gcode_G28() {
home_all_axis = !homeX && !homeY && !homeZ; // No parameters means home all axes home_all_axis = !homeX && !homeY && !homeZ; // No parameters means home all axes
#if Z_HOME_DIR > 0 // If homing away from BED do Z first #if Z_HOME_DIR > 0 // If homing away from BED do Z first
if (home_all_axis || homeZ) HOMEAXIS(Z); if (home_all_axis || homeZ) HOMEAXIS(Z);
#elif !defined(Z_SAFE_HOMING) && defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
// Raise Z before homing any other axes
if (home_all_axis || homeZ) {
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
feedrate = max_feedrate[Z_AXIS];
line_to_destination();
st_synchronize();
}
#endif #endif
#ifdef QUICK_HOME #ifdef QUICK_HOME
@ -1897,16 +1909,7 @@ inline void gcode_G28() {
#ifndef Z_SAFE_HOMING #ifndef Z_SAFE_HOMING
if (home_all_axis || homeZ) { if (home_all_axis || homeZ) HOMEAXIS(Z);
// Raise Z before homing Z? Shouldn't this happen before homing X or Y?
#if defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
feedrate = max_feedrate[Z_AXIS];
line_to_destination();
st_synchronize();
#endif
HOMEAXIS(Z);
}
#else // Z_SAFE_HOMING #else // Z_SAFE_HOMING

Loading…
Cancel
Save