💥 Num Axes / Multi-Stepper based on Driver Types (#24106, #24120)

This commit is contained in:
Scott Lahteine
2022-04-29 15:21:15 -05:00
parent 1e127a93c4
commit 1d8d8dccf4
36 changed files with 571 additions and 507 deletions

View File

@ -357,9 +357,9 @@ class Stepper {
#endif
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
static bool locked_Z_motor, locked_Z2_motor
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
, locked_Z3_motor
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
, locked_Z4_motor
#endif
#endif
@ -561,18 +561,18 @@ class Stepper {
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
FORCE_INLINE static void set_z1_lock(const bool state) { locked_Z_motor = state; }
FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
FORCE_INLINE static void set_z4_lock(const bool state) { locked_Z4_motor = state; }
#endif
#endif
static void set_all_z_lock(const bool lock, const int8_t except=-1) {
set_z1_lock(lock ^ (except == 0));
set_z2_lock(lock ^ (except == 1));
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
set_z3_lock(lock ^ (except == 2));
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
set_z4_lock(lock ^ (except == 3));
#endif
#endif