From e8bda62d2af42e68035f1a3de007b14a28f5d08a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 8 Dec 2018 15:31:32 -0600 Subject: [PATCH] Followup to servo angles patch Fix #12594 --- Marlin/src/module/configuration_store.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 796f5477c..9d7451588 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -76,6 +76,9 @@ #if HAS_SERVOS #include "servo.h" +#endif + +#if HAS_SERVOS && HAS_SERVO_ANGLES #define EEPROM_NUM_SERVOS NUM_SERVOS #else #define EEPROM_NUM_SERVOS NUM_SERVO_PLUGS @@ -634,8 +637,8 @@ void MarlinSettings::postprocess() { { _FIELD_TEST(servo_angles); - #if !HAS_SERVOS - uint16_t servo_angles[NUM_SERVO_PLUGS][2] = { { 0, 0 } }; + #if !HAS_SERVO_ANGLES + uint16_t servo_angles[EEPROM_NUM_SERVOS][2] = { { 0, 0 } }; #endif EEPROM_WRITE(servo_angles); }