Fix firmware-retract compile errors (#12061)
This commit is contained in:
parent
43940d59ed
commit
d332fcb8fa
@ -60,7 +60,9 @@ float FWRetract::current_retract[EXTRUDERS], // Retract value used by p
|
|||||||
FWRetract::current_hop;
|
FWRetract::current_hop;
|
||||||
|
|
||||||
void FWRetract::reset() {
|
void FWRetract::reset() {
|
||||||
autoretract_enabled = false;
|
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||||
|
autoretract_enabled = false;
|
||||||
|
#endif
|
||||||
settings.retract_length = RETRACT_LENGTH;
|
settings.retract_length = RETRACT_LENGTH;
|
||||||
settings.retract_feedrate_mm_s = RETRACT_FEEDRATE;
|
settings.retract_feedrate_mm_s = RETRACT_FEEDRATE;
|
||||||
settings.retract_zlift = RETRACT_ZLIFT;
|
settings.retract_zlift = RETRACT_ZLIFT;
|
||||||
|
@ -697,11 +697,14 @@ void MarlinSettings::postprocess() {
|
|||||||
|
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
EEPROM_WRITE(fwretract.settings);
|
EEPROM_WRITE(fwretract.settings);
|
||||||
EEPROM_WRITE(fwretract.autoretract_enabled);
|
|
||||||
#else
|
#else
|
||||||
const fwretract_settings_t autoretract_defaults = { 3, 45, 0, 0, 0, 13, 0, 8 };
|
const fwretract_settings_t autoretract_defaults = { 3, 45, 0, 0, 0, 13, 0, 8 };
|
||||||
const bool autoretract_enabled = false;
|
|
||||||
EEPROM_WRITE(autoretract_defaults);
|
EEPROM_WRITE(autoretract_defaults);
|
||||||
|
#endif
|
||||||
|
#if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT)
|
||||||
|
EEPROM_WRITE(fwretract.autoretract_enabled);
|
||||||
|
#else
|
||||||
|
const bool autoretract_enabled = false;
|
||||||
EEPROM_WRITE(autoretract_enabled);
|
EEPROM_WRITE(autoretract_enabled);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1311,11 +1314,11 @@ void MarlinSettings::postprocess() {
|
|||||||
|
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
EEPROM_READ(fwretract.settings);
|
EEPROM_READ(fwretract.settings);
|
||||||
|
#endif
|
||||||
|
#if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT)
|
||||||
EEPROM_READ(fwretract.autoretract_enabled);
|
EEPROM_READ(fwretract.autoretract_enabled);
|
||||||
#else
|
#else
|
||||||
fwretract_settings_t fwretract_settings;
|
|
||||||
bool autoretract_enabled;
|
bool autoretract_enabled;
|
||||||
EEPROM_READ(fwretract_settings);
|
|
||||||
EEPROM_READ(autoretract_enabled);
|
EEPROM_READ(autoretract_enabled);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user