💥 Num Axes and Multi-Stepper based on Driver Types (#24120)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
@@ -366,9 +366,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
|
||||
@@ -570,18 +570,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
|
||||
|
||||
Reference in New Issue
Block a user