Browse Source

Put #ifdef around servo pins in pins.h. This allows the pins to be used for M42.

Erik van der Zalm 11 years ago
parent
commit
7231a20dba
1 changed files with 12 additions and 4 deletions
  1. 12
    4
      Marlin/pins.h

+ 12
- 4
Marlin/pins.h View File

@@ -375,10 +375,18 @@
375 375
 #define HEATER_BED_PIN     8    // BED
376 376
 #define TEMP_BED_PIN       14   // ANALOG NUMBERING
377 377
 
378
-#define SERVO0_PIN         11
379
-#define SERVO1_PIN         6
380
-#define SERVO2_PIN         5
381
-#define SERVO3_PIN         4
378
+#ifdef NUM_SERVOS
379
+  #define SERVO0_PIN         11
380
+  #if NUM_SERVOS > 1
381
+  #define SERVO1_PIN         6
382
+  #endif
383
+  #if NUM_SERVOS > 2
384
+  #define SERVO2_PIN         5
385
+  #endif
386
+  #if NUM_SERVOS > 2
387
+  #define SERVO3_PIN         4
388
+  #endif
389
+#endif
382 390
 
383 391
 #ifdef ULTRA_LCD
384 392
 

Loading…
Cancel
Save