From adee17847c1314b3f11bfb849e2bdb9d58046323 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Nov 2017 16:42:22 -0600 Subject: [PATCH] Fix #8540 Does it? --- Marlin/Marlin_main.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index b46c3f337..4e83379e2 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2416,8 +2416,20 @@ static void clean_up_after_endstop_or_probe_move() { : !position_is_reachable_by_probe(rx, ry) ) return NAN; - // Move the probe to the given XY - do_blocking_move_to_xy(nx, ny, XY_PROBE_FEEDRATE_MM_S); + const float nz = + #if ENABLED(DELTA) + // Move below clip height or xy move will be aborted by do_blocking_move_to + min(current_position[Z_AXIS], delta_clip_start_height) + #else + current_position[Z_AXIS] + #endif + ; + + const float old_feedrate_mm_s = feedrate_mm_s; + feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S; + + // Move the probe to the starting XYZ + do_blocking_move_to(nx, ny, nz); float measured_z = NAN; if (!DEPLOY_PROBE()) { @@ -2443,6 +2455,8 @@ static void clean_up_after_endstop_or_probe_move() { if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< probe_pt"); #endif + feedrate_mm_s = old_feedrate_mm_s; + if (isnan(measured_z)) { LCD_MESSAGEPGM(MSG_ERR_PROBING_FAILED); SERIAL_ERROR_START();