Browse Source

Sanity-check SERVO pin for servo probes

Scott Lahteine 7 years ago
parent
commit
136860e8bb
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      Marlin/src/inc/SanityCheck.h

+ 8
- 0
Marlin/src/inc/SanityCheck.h View File

@@ -795,6 +795,14 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
795 795
   #if HAS_Z_SERVO_PROBE
796 796
     #ifndef NUM_SERVOS
797 797
       #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)."
798
+    #elif Z_PROBE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
799
+      #error "SERVO0_PIN must be defined for your servo or BLTOUCH probe."
800
+    #elif Z_PROBE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
801
+      #error "SERVO1_PIN must be defined for your servo or BLTOUCH probe."
802
+    #elif Z_PROBE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
803
+      #error "SERVO2_PIN must be defined for your servo or BLTOUCH probe."
804
+    #elif Z_PROBE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
805
+      #error "SERVO3_PIN must be defined for your servo or BLTOUCH probe."
798 806
     #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
799 807
       #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
800 808
     #endif

Loading…
Cancel
Save