From 7231a20dbad724dc5d6eb29e3eb0cdbfc9c80bf7 Mon Sep 17 00:00:00 2001 From: Erik van der Zalm Date: Fri, 24 May 2013 21:05:11 +0200 Subject: [PATCH] Put #ifdef around servo pins in pins.h. This allows the pins to be used for M42. --- Marlin/pins.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index 36f6703743..1511a4cdd4 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -375,10 +375,18 @@ #define HEATER_BED_PIN 8 // BED #define TEMP_BED_PIN 14 // ANALOG NUMBERING -#define SERVO0_PIN 11 -#define SERVO1_PIN 6 -#define SERVO2_PIN 5 -#define SERVO3_PIN 4 +#ifdef NUM_SERVOS + #define SERVO0_PIN 11 + #if NUM_SERVOS > 1 + #define SERVO1_PIN 6 + #endif + #if NUM_SERVOS > 2 + #define SERVO2_PIN 5 + #endif + #if NUM_SERVOS > 2 + #define SERVO3_PIN 4 + #endif +#endif #ifdef ULTRA_LCD