diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 25574bdf3b..dd97441dc6 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -72,6 +72,9 @@ #if HAS_SERVOS #include "servo.h" +#else + #undef NUM_SERVOS + #define NUM_SERVOS NUM_SERVO_PLUGS #endif #if HAS_BED_PROBE @@ -185,7 +188,7 @@ typedef struct SettingsDataStruct { // // SERVO_ANGLES // - uint16_t servo_angles[NUM_SERVO_PLUGS][2]; // M281 P L U + uint16_t servo_angles[NUM_SERVOS][2]; // M281 P L U // // DELTA / [XYZ]_DUAL_ENDSTOPS @@ -562,7 +565,7 @@ void MarlinSettings::postprocess() { #if ENABLED(SWITCHING_EXTRUDER) constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES; #endif - constexpr uint16_t servo_angles[NUM_SERVO_PLUGS][2] = { + constexpr uint16_t servo_angles[NUM_SERVOS][2] = { #if ENABLED(SWITCHING_EXTRUDER) [SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0][0], sesa[0][1] } #if EXTRUDERS > 3 @@ -1181,7 +1184,7 @@ void MarlinSettings::postprocess() { // SERVO_ANGLES // #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES) - uint16_t servo_angles[NUM_SERVO_PLUGS][2]; + uint16_t servo_angles[NUM_SERVOS][2]; #endif EEPROM_READ(servo_angles);