Make EEPROM storage consistent

Update ConfigurationStore to always write dummy values for disabled
options, including FWRETRACT, DELTA, and SCARA. Update the EEPROM
version to “V15.” Also fixes a buffer overrun with axis_scaling in
Config_ResetDefault.
This commit is contained in:
Scott Lahteine 2015-01-28 01:08:48 -08:00
parent 34377ee512
commit 093fedfde8
3 changed files with 610 additions and 495 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,17 +6,17 @@
void Config_ResetDefault();
#ifndef DISABLE_M503
void Config_PrintSettings();
void Config_PrintSettings(bool forReplay=false);
#else
FORCE_INLINE void Config_PrintSettings() {}
FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {}
#endif
#ifdef EEPROM_SETTINGS
void Config_StoreSettings();
void Config_RetrieveSettings();
void Config_StoreSettings();
void Config_RetrieveSettings();
#else
FORCE_INLINE void Config_StoreSettings() {}
FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
FORCE_INLINE void Config_StoreSettings() {}
FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
#endif
#endif//CONFIG_STORE_H
#endif // __CONFIG_STORE_H

View file

@ -164,7 +164,7 @@
// M500 - stores parameters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
// M503 - print the current settings (from memory not from EEPROM)
// M503 - print the current settings (from memory not from EEPROM). Use S0 to leave off headings.
// M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
// M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
// M665 - set delta configurations
@ -3581,7 +3581,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
break;
case 503: // M503 print settings currently in memory
{
Config_PrintSettings();
Config_PrintSettings(code_seen('S') && code_value == 0);
}
break;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED