Browse Source

Make sure NUM_SERVOS is set for Z servo endstop

Scott Lahteine 9 years ago
parent
commit
42ce60c5cc
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      Marlin/SanityCheck.h

+ 11
- 0
Marlin/SanityCheck.h View File

234
 #if PROBE_SELECTED
234
 #if PROBE_SELECTED
235
 
235
 
236
   /**
236
   /**
237
+   * NUM_SERVOS is required for a Z servo probe
238
+   */
239
+  #if HAS_Z_SERVO_ENDSTOP
240
+    #ifndef NUM_SERVOS
241
+      #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
242
+    #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
243
+      #error "Z_ENDSTOP_SERVO_NR must be less than NUM_SERVOS."
244
+    #endif
245
+  #endif
246
+
247
+  /**
237
    * A probe needs a pin
248
    * A probe needs a pin
238
    */
249
    */
239
   #if !PROBE_PIN_CONFIGURED
250
   #if !PROBE_PIN_CONFIGURED

Loading…
Cancel
Save