From a18d6171a6122cc5cfb3743c9635ea7a8c07b61e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 28 Feb 2018 05:30:24 -0600 Subject: [PATCH] Fix Z safe homing sanity check for no probe Fix #9851 --- Marlin/SanityCheck.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index bbaa0bc45..10cfbfb8b 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -920,18 +920,16 @@ static_assert(1 >= 0 * Make sure Z_SAFE_HOMING point is reachable */ #if ENABLED(Z_SAFE_HOMING) - #if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X) - #if HAS_BED_PROBE + #if HAS_BED_PROBE + #if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X) #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe." - #else - #error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle." - #endif - #elif !WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y) - #if HAS_BED_PROBE + #elif !WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y) #error "Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe." - #else - #error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle." #endif + #elif !WITHIN(Z_SAFE_HOMING_X_POINT, X_MIN_POS, X_MAX_POS) + #error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle." + #elif !WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS) + #error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle." #endif #endif // Z_SAFE_HOMING