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
   #if HAS_Z_SERVO_PROBE
795
   #if HAS_Z_SERVO_PROBE
796
     #ifndef NUM_SERVOS
796
     #ifndef NUM_SERVOS
797
       #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)."
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
     #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
806
     #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
799
       #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
807
       #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
800
     #endif
808
     #endif

Loading…
Cancel
Save