From 136860e8bba1937bc06c9a6fcdca2befd4afc357 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 31 Aug 2018 15:47:35 -0500 Subject: [PATCH] Sanity-check SERVO pin for servo probes --- Marlin/src/inc/SanityCheck.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 67fbaafde..1de532a6e 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -795,6 +795,14 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #if HAS_Z_SERVO_PROBE #ifndef NUM_SERVOS #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)." + #elif Z_PROBE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0) + #error "SERVO0_PIN must be defined for your servo or BLTOUCH probe." + #elif Z_PROBE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1) + #error "SERVO1_PIN must be defined for your servo or BLTOUCH probe." + #elif Z_PROBE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2) + #error "SERVO2_PIN must be defined for your servo or BLTOUCH probe." + #elif Z_PROBE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3) + #error "SERVO3_PIN must be defined for your servo or BLTOUCH probe." #elif Z_PROBE_SERVO_NR >= NUM_SERVOS #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS." #endif