Sfoglia il codice sorgente

Fix firmware-retract compile errors (#12061)

InsanityAutomation 6 anni fa
parent
commit
d332fcb8fa

+ 3
- 1
Marlin/src/feature/fwretract.cpp Vedi File

@@ -60,7 +60,9 @@ float FWRetract::current_retract[EXTRUDERS],          // Retract value used by p
60 60
       FWRetract::current_hop;
61 61
 
62 62
 void FWRetract::reset() {
63
-  autoretract_enabled = false;
63
+  #if ENABLED(FWRETRACT_AUTORETRACT)
64
+    autoretract_enabled = false;
65
+  #endif
64 66
   settings.retract_length = RETRACT_LENGTH;
65 67
   settings.retract_feedrate_mm_s = RETRACT_FEEDRATE;
66 68
   settings.retract_zlift = RETRACT_ZLIFT;

+ 8
- 5
Marlin/src/module/configuration_store.cpp Vedi File

@@ -697,11 +697,14 @@ void MarlinSettings::postprocess() {
697 697
 
698 698
       #if ENABLED(FWRETRACT)
699 699
         EEPROM_WRITE(fwretract.settings);
700
-        EEPROM_WRITE(fwretract.autoretract_enabled);
701 700
       #else
702 701
         const fwretract_settings_t autoretract_defaults = { 3, 45, 0, 0, 0, 13, 0, 8 };
703
-        const bool autoretract_enabled = false;
704 702
         EEPROM_WRITE(autoretract_defaults);
703
+      #endif
704
+      #if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT)
705
+        EEPROM_WRITE(fwretract.autoretract_enabled);
706
+      #else
707
+        const bool autoretract_enabled = false;
705 708
         EEPROM_WRITE(autoretract_enabled);
706 709
       #endif
707 710
     }
@@ -1311,11 +1314,11 @@ void MarlinSettings::postprocess() {
1311 1314
 
1312 1315
         #if ENABLED(FWRETRACT)
1313 1316
           EEPROM_READ(fwretract.settings);
1317
+        #endif
1318
+        #if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT)
1314 1319
           EEPROM_READ(fwretract.autoretract_enabled);
1315 1320
         #else
1316
-          fwretract_settings_t fwretract_settings;
1317 1321
           bool autoretract_enabled;
1318
-          EEPROM_READ(fwretract_settings);
1319 1322
           EEPROM_READ(autoretract_enabled);
1320 1323
         #endif
1321 1324
       }
@@ -1575,7 +1578,7 @@ void MarlinSettings::postprocess() {
1575 1578
         _FIELD_TEST(sn_settings);
1576 1579
         EEPROM_READ(sn_settings);
1577 1580
       #endif
1578
-  
1581
+
1579 1582
       eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET));
1580 1583
       if (eeprom_error) {
1581 1584
         #if ENABLED(EEPROM_CHITCHAT)

Loading…
Annulla
Salva