From 38560378fcb99bcdb4b889f3b8e08c7dc5abe366 Mon Sep 17 00:00:00 2001 From: engrenage <32837871+petaflot@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:24:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Allow=20float=20Z=5FPROBE=5FLOW?= =?UTF-8?q?=5FPOINT=20(#26711)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 4 +--- Marlin/src/module/probe.cpp | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5a22accc6d..ccbf5c6705 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1508,9 +1508,7 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #endif #endif - #if Z_PROBE_LOW_POINT > 0 - #error "Z_PROBE_LOW_POINT must be less than or equal to 0." - #endif + static_assert(Z_PROBE_LOW_POINT <= 0, "Z_PROBE_LOW_POINT must be less than or equal to 0."); #if ENABLED(PROBE_ACTIVATION_SWITCH) #ifndef PROBE_ACTIVATION_SWITCH_STATE diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index ee9e9b34ac..2fec098b8a 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -1010,6 +1010,10 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai // If any error occurred stow the probe and set an alert if (isnan(measured_z)) { + // TODO: Disable steppers (unless G29_RETRY_AND_RECOVER or G29_HALT_ON_FAILURE are set). + // Something definitely went wrong at this point, so it might be a good idea to release the steppers. + // The user may want to quickly move the carriage or bed by hand to avoid bed damage from the (hot) nozzle. + // This would also benefit from the contemplated "Audio Alerts" feature. stow(); LCD_MESSAGE(MSG_LCD_PROBING_FAILED); #if DISABLED(G29_RETRY_AND_RECOVER)