Browse Source

Throw an error if no E stepper is free for X2, Y2, Z2

Scott Lahteine 7 years ago
parent
commit
70f31b6c76
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      Marlin/pins.h

+ 9
- 0
Marlin/pins.h View File

461
     #define X2_STEP_PIN   _EPIN(E_STEPPERS, STEP)
461
     #define X2_STEP_PIN   _EPIN(E_STEPPERS, STEP)
462
     #define X2_DIR_PIN    _EPIN(E_STEPPERS, DIR)
462
     #define X2_DIR_PIN    _EPIN(E_STEPPERS, DIR)
463
     #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
463
     #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
464
+    #if X2_ENABLE_PIN == 0
465
+      #error "No E stepper plug left for X2!"
466
+    #endif
464
   #endif
467
   #endif
465
   #undef _X2_PINS
468
   #undef _X2_PINS
466
   #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
469
   #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
475
     #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
478
     #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
476
     #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
479
     #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
477
     #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
480
     #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
481
+    #if Y2_ENABLE_PIN == 0
482
+      #error "No E stepper plug left for Y2!"
483
+    #endif
478
   #endif
484
   #endif
479
   #undef _Y2_PINS
485
   #undef _Y2_PINS
480
   #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
486
   #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
489
     #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
495
     #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
490
     #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
496
     #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
491
     #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
497
     #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
498
+    #if Z2_ENABLE_PIN == 0
499
+      #error "No E stepper plug left for Z2!"
500
+    #endif
492
   #endif
501
   #endif
493
   #undef _Z2_PINS
502
   #undef _Z2_PINS
494
   #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,
503
   #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,

Loading…
Cancel
Save