Browse Source

Sanity-check SERVO pin for servo probes

pull/1/head
Scott Lahteine 6 years ago
parent
commit
136860e8bb
  1. 8
      Marlin/src/inc/SanityCheck.h

8
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

Loading…
Cancel
Save