Browse Source

Followup to servo angles patch

Fix #12594
Scott Lahteine 6 years ago
parent
commit
e8bda62d2a
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      Marlin/src/module/configuration_store.cpp

+ 5
- 2
Marlin/src/module/configuration_store.cpp View File

@@ -76,6 +76,9 @@
76 76
 
77 77
 #if HAS_SERVOS
78 78
   #include "servo.h"
79
+#endif
80
+
81
+#if HAS_SERVOS && HAS_SERVO_ANGLES
79 82
   #define EEPROM_NUM_SERVOS NUM_SERVOS
80 83
 #else
81 84
   #define EEPROM_NUM_SERVOS NUM_SERVO_PLUGS
@@ -634,8 +637,8 @@ void MarlinSettings::postprocess() {
634 637
     {
635 638
       _FIELD_TEST(servo_angles);
636 639
 
637
-      #if !HAS_SERVOS
638
-        uint16_t servo_angles[NUM_SERVO_PLUGS][2] = { { 0, 0 } };
640
+      #if !HAS_SERVO_ANGLES
641
+        uint16_t servo_angles[EEPROM_NUM_SERVOS][2] = { { 0, 0 } };
639 642
       #endif
640 643
       EEPROM_WRITE(servo_angles);
641 644
     }

Loading…
Cancel
Save