💥 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

@@ -347,9 +347,9 @@ typedef struct SettingsDataStruct {
// Z_STEPPER_AUTO_ALIGN, HAS_Z_STEPPER_ALIGN_STEPPER_XY
//
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
xy_pos_t z_stepper_align_xy[NUM_Z_STEPPER_DRIVERS]; // M422 S X Y
xy_pos_t z_stepper_align_xy[NUM_Z_STEPPERS]; // M422 S X Y
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPER_DRIVERS]; // M422 W X Y
xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPERS]; // M422 W X Y
#endif
#endif
@@ -1017,13 +1017,13 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float
EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
EEPROM_WRITE(endstops.z3_endstop_adj); // 1 float
#else
EEPROM_WRITE(dummyf);
#endif
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
EEPROM_WRITE(endstops.z4_endstop_adj); // 1 float
#else
EEPROM_WRITE(dummyf);
@@ -1969,12 +1969,12 @@ void MarlinSettings::postprocess() {
EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float
EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
EEPROM_READ(endstops.z3_endstop_adj); // 1 float
#else
EEPROM_READ(dummyf);
#endif
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
EEPROM_READ(endstops.z4_endstop_adj); // 1 float
#else
EEPROM_READ(dummyf);
@@ -3042,13 +3042,13 @@ void MarlinSettings::reset() {
#define Z2_ENDSTOP_ADJUSTMENT 0
#endif
endstops.z2_endstop_adj = Z2_ENDSTOP_ADJUSTMENT;
#if NUM_Z_STEPPER_DRIVERS >= 3
#if NUM_Z_STEPPERS >= 3
#ifndef Z3_ENDSTOP_ADJUSTMENT
#define Z3_ENDSTOP_ADJUSTMENT 0
#endif
endstops.z3_endstop_adj = Z3_ENDSTOP_ADJUSTMENT;
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#if NUM_Z_STEPPERS >= 4
#ifndef Z4_ENDSTOP_ADJUSTMENT
#define Z4_ENDSTOP_ADJUSTMENT 0
#endif