Make clean_up function available for probes

This commit is contained in:
Scott Lahteine 2016-06-20 16:21:43 -07:00
parent 51d52cb52a
commit ed75b0ea11

View file

@ -1583,6 +1583,16 @@ static void setup_for_endstop_move() {
#if HAS_BED_PROBE #if HAS_BED_PROBE
static void clean_up_after_endstop_move() {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("clean_up_after_endstop_move > endstops.not_homing()");
#endif
endstops.not_homing();
feedrate = saved_feedrate;
feedrate_multiplier = saved_feedrate_multiplier;
refresh_cmd_timeout();
}
#if ENABLED(DELTA) #if ENABLED(DELTA)
/** /**
* Calculate delta, start a line, and set current_position to destination * Calculate delta, start a line, and set current_position to destination
@ -2067,7 +2077,10 @@ static void setup_for_endstop_move() {
#else // !DELTA #else // !DELTA
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
planner.bed_level_matrix.set_to_identity(); planner.bed_level_matrix.set_to_identity();
#endif
feedrate = homing_feedrate[Z_AXIS]; feedrate = homing_feedrate[Z_AXIS];
// Move down until the Z probe (or endstop?) is triggered // Move down until the Z probe (or endstop?) is triggered
@ -2117,16 +2130,6 @@ static void setup_for_endstop_move() {
do_blocking_move_to(x, y, current_position[Z_AXIS]); do_blocking_move_to(x, y, current_position[Z_AXIS]);
} }
static void clean_up_after_endstop_move() {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("clean_up_after_endstop_move > ENDSTOPS_ONLY_FOR_HOMING > endstops.not_homing()");
#endif
endstops.not_homing();
feedrate = saved_feedrate;
feedrate_multiplier = saved_feedrate_multiplier;
refresh_cmd_timeout();
}
enum ProbeAction { enum ProbeAction {
ProbeStay = 0, ProbeStay = 0,
ProbeDeploy = _BV(0), ProbeDeploy = _BV(0),