💥 Num Axes and Multi-Stepper based on Driver Types (#24120)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
Keith Bennett
2022-05-04 17:25:02 -07:00
committed by GitHub
parent 6237a6a6d3
commit df40181357
33 changed files with 266 additions and 259 deletions

View File

@@ -1234,7 +1234,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#if Z_HOME_TO_MAX
#ifndef Z3_MAX_ENDSTOP_INVERTING
#if Z3_USE_ENDSTOP == _XMIN_
@@ -1366,7 +1366,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#if Z_HOME_TO_MAX
#ifndef Z4_MAX_ENDSTOP_INVERTING
#if Z4_USE_ENDSTOP == _XMIN_
@@ -1675,7 +1675,7 @@
#undef DISABLE_INACTIVE_Z
#endif
#if NUM_Z_STEPPER_DRIVERS >= 2
#if NUM_Z_STEPPERS >= 2
#if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
#define HAS_Z2_ENABLE 1
#endif
@@ -1690,7 +1690,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
#define HAS_Z3_ENABLE 1
#endif
@@ -1705,7 +1705,7 @@
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
#define HAS_Z4_ENABLE 1
#endif
@@ -2080,7 +2080,7 @@
#ifndef Y_SLAVE_ADDRESS
#define Y_SLAVE_ADDRESS 0
#endif
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#if HAS_DUAL_Y_STEPPERS
#if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)
#define Y2_SENSORLESS 1
#endif
@@ -2127,7 +2127,7 @@
#ifndef Z_SLAVE_ADDRESS
#define Z_SLAVE_ADDRESS 0
#endif
#if NUM_Z_STEPPER_DRIVERS >= 2
#if NUM_Z_STEPPERS >= 2
#if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)
#define Z2_SENSORLESS 1
#endif
@@ -2144,7 +2144,7 @@
#define Z2_SLAVE_ADDRESS 0
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3)
#define Z3_SENSORLESS 1
#endif
@@ -2161,7 +2161,7 @@
#define Z3_SLAVE_ADDRESS 0
#endif
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4)
#define Z4_SENSORLESS 1
#endif
@@ -2542,8 +2542,8 @@
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
#define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
#if _HAS_STOP(X,MIN)