X_DUAL_STEPPER_DRIVERS implementation
This commit is contained in:
@ -369,8 +369,8 @@
|
||||
#define __EPIN(p,q) E##p##_##q##_PIN
|
||||
#define _EPIN(p,q) __EPIN(p,q)
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
// The X2 axis, if any, should be the next open extruder port
|
||||
// The X2 axis, if any, should be the next open extruder port
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
|
||||
#ifndef X2_STEP_PIN
|
||||
#define X2_STEP_PIN _EPIN(EXTRUDERS, STEP)
|
||||
#define X2_DIR_PIN _EPIN(EXTRUDERS, DIR)
|
||||
@ -378,25 +378,32 @@
|
||||
#endif
|
||||
#undef _X2_PINS
|
||||
#define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
|
||||
#define Y2_Z2_E_INDEX INCREMENT(EXTRUDERS)
|
||||
#define Y2_E_INDEX INCREMENT(EXTRUDERS)
|
||||
#else
|
||||
#define Y2_Z2_E_INDEX EXTRUDERS
|
||||
#define Y2_E_INDEX EXTRUDERS
|
||||
#endif
|
||||
|
||||
// The Y2 axis, if any, should be the next open extruder port
|
||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !defined(Y2_STEP_PIN)
|
||||
#define Y2_STEP_PIN _EPIN(Y2_Z2_E_INDEX, STEP)
|
||||
#define Y2_DIR_PIN _EPIN(Y2_Z2_E_INDEX, DIR)
|
||||
#define Y2_ENABLE_PIN _EPIN(Y2_Z2_E_INDEX, ENABLE)
|
||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
||||
#ifndef Y2_STEP_PIN
|
||||
#define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
|
||||
#define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
|
||||
#define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
|
||||
#endif
|
||||
#undef _Y2_PINS
|
||||
#define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
|
||||
#define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
|
||||
#else
|
||||
#define Z2_E_INDEX Y2_E_INDEX
|
||||
#endif
|
||||
|
||||
// The Z2 axis, if any, should be the next open extruder port
|
||||
#if ENABLED(Z_DUAL_STEPPER_DRIVERS) && !defined(Z2_STEP_PIN)
|
||||
#define Z2_STEP_PIN _EPIN(Y2_Z2_E_INDEX, STEP)
|
||||
#define Z2_DIR_PIN _EPIN(Y2_Z2_E_INDEX, DIR)
|
||||
#define Z2_ENABLE_PIN _EPIN(Y2_Z2_E_INDEX, ENABLE)
|
||||
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
|
||||
#ifndef Z2_STEP_PIN
|
||||
#define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
|
||||
#define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
|
||||
#define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
|
||||
#endif
|
||||
#undef _Z2_PINS
|
||||
#define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user