Make sure NUM_SERVOS is set for Z servo endstop

This commit is contained in:
Scott Lahteine 2016-06-22 14:01:19 -07:00
parent b590a7dee0
commit 42ce60c5cc

View file

@ -233,6 +233,17 @@
#if PROBE_SELECTED
/**
* NUM_SERVOS is required for a Z servo probe
*/
#if HAS_Z_SERVO_ENDSTOP
#ifndef NUM_SERVOS
#error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
#elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
#error "Z_ENDSTOP_SERVO_NR must be less than NUM_SERVOS."
#endif
#endif
/**
* A probe needs a pin
*/