Further cleanup of G28 for probes

master
AnHardt 9 years ago committed by Scott Lahteine
parent 39883d03fc
commit e480ee0054

@ -1713,10 +1713,7 @@ static void clean_up_after_endstop_or_probe_move() {
z_dest -= zprobe_zoffset; z_dest -= zprobe_zoffset;
if (z_dest > current_position[Z_AXIS]) { if (z_dest > current_position[Z_AXIS]) {
float old_feedrate = feedrate;
feedrate = homing_feedrate[Z_AXIS];
do_blocking_move_to_z(z_dest); do_blocking_move_to_z(z_dest);
feedrate = old_feedrate;
} }
} }
@ -1795,9 +1792,7 @@ static void clean_up_after_endstop_or_probe_move() {
if (endstops.z_probe_enabled) return; if (endstops.z_probe_enabled) return;
// Make room for probe // Make room for probe
#if _Z_RAISE_PROBE_DEPLOY_STOW > 0
do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW); do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW);
#endif
#if ENABLED(Z_PROBE_SLED) #if ENABLED(Z_PROBE_SLED)
@ -1899,9 +1894,7 @@ static void clean_up_after_endstop_or_probe_move() {
if (!endstops.z_probe_enabled) return; if (!endstops.z_probe_enabled) return;
// Make more room for the servo // Make more room for the servo
#if _Z_RAISE_PROBE_DEPLOY_STOW > 0
do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW); do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW);
#endif
#if ENABLED(Z_PROBE_SLED) #if ENABLED(Z_PROBE_SLED)
@ -2839,6 +2832,10 @@ 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
#if HAS_BED_PROBE
do_probe_raise(MIN_Z_HEIGHT_FOR_HOMING);
destination[Z_AXIS] = current_position[Z_AXIS];
#else
// Raise Z before homing any other axes and z is not already high enough (never lower z) // Raise Z before homing any other axes and z is not already high enough (never lower z)
if (current_position[Z_AXIS] <= MIN_Z_HEIGHT_FOR_HOMING) { if (current_position[Z_AXIS] <= MIN_Z_HEIGHT_FOR_HOMING) {
destination[Z_AXIS] = MIN_Z_HEIGHT_FOR_HOMING; destination[Z_AXIS] = MIN_Z_HEIGHT_FOR_HOMING;
@ -2862,6 +2859,7 @@ inline void gcode_G28() {
current_position[Z_AXIS] = destination[Z_AXIS]; current_position[Z_AXIS] = destination[Z_AXIS];
} }
#endif #endif
#endif
#if ENABLED(QUICK_HOME) #if ENABLED(QUICK_HOME)
@ -2917,7 +2915,12 @@ inline void gcode_G28() {
#if ENABLED(HOME_Y_BEFORE_X) #if ENABLED(HOME_Y_BEFORE_X)
// Home Y // Home Y
if (home_all_axis || homeY) HOMEAXIS(Y); if (home_all_axis || homeY) {
HOMEAXIS(Y);
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position);
#endif
}
#endif #endif
// Home X // Home X

Loading…
Cancel
Save