diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 6f2a674f22..7bf68c0099 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -756,7 +756,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, /** * Limited number of servos */ -#if NUM_SERVOS > MAX_SERVOS +#if NUM_SERVOS > NUM_SERVO_PLUGS #error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS." #endif diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index ae48b7e7a4..6a5d630473 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -181,7 +181,7 @@ typedef struct SettingsDataStruct { // // SERVO_ANGLES // - uint16_t servo_angles[MAX_SERVOS][2]; // M281 P L U + uint16_t servo_angles[NUM_SERVO_PLUGS][2]; // M281 P L U // // DELTA / [XYZ]_DUAL_ENDSTOPS @@ -545,7 +545,7 @@ void MarlinSettings::postprocess() { #if ENABLED(SWITCHING_EXTRUDER) constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES; #endif - constexpr uint16_t servo_angles[MAX_SERVOS][2] = { + constexpr uint16_t servo_angles[NUM_SERVO_PLUGS][2] = { #if ENABLED(SWITCHING_EXTRUDER) [SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0], sesa[1] } #if EXTRUDERS > 3 @@ -1167,7 +1167,7 @@ void MarlinSettings::postprocess() { // SERVO_ANGLES // #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES) - uint16_t servo_angles[MAX_SERVOS][2]; + uint16_t servo_angles[NUM_SERVO_PLUGS][2]; #endif EEPROM_READ(servo_angles); diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 76c58576bd..6218dffcc9 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -627,8 +627,8 @@ #define MAX_EXTRUDERS 5 #endif -#ifndef MAX_SERVOS - #define MAX_SERVOS 4 +#ifndef NUM_SERVO_PLUGS + #define NUM_SERVO_PLUGS 4 #endif //