From ca87e4c0fd3f0469546744af086a58ff873a2574 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 30 Aug 2018 18:33:06 -0500 Subject: [PATCH] Sanity-check SERVO pin for servo probes --- Marlin/SanityCheck.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index c5c97248c..97416896b 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -761,6 +761,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