Merge pull request #1428 from thinkyhead/issue_1388_eeprom

Make EEPROM storage consistent
This commit is contained in:
Scott Lahteine 2015-01-28 22:58:04 -08:00
commit 7df9ca051c
5 changed files with 622 additions and 495 deletions

File diff suppressed because it is too large Load diff

View file

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

View file

@ -86,6 +86,8 @@ extern const char echomagic[] PROGMEM;
#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value))) #define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value)))
#define SERIAL_EOL SERIAL_ECHOLN("")
void serial_echopair_P(const char *s_P, float v); void serial_echopair_P(const char *s_P, float v);
void serial_echopair_P(const char *s_P, double v); void serial_echopair_P(const char *s_P, double v);
void serial_echopair_P(const char *s_P, unsigned long v); void serial_echopair_P(const char *s_P, unsigned long v);

View file

@ -164,7 +164,7 @@
// M500 - stores parameters in EEPROM // M500 - stores parameters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). // 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. // 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) // 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] // 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 // 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; break;
case 503: // M503 print settings currently in memory case 503: // M503 print settings currently in memory
{ {
Config_PrintSettings(); Config_PrintSettings(code_seen('S') && code_value == 0);
} }
break; break;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED

View file

@ -155,6 +155,8 @@
#define MSG_BABYSTEPPING_Z "Babystepping Z" #define MSG_BABYSTEPPING_Z "Babystepping Z"
#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure" #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure"
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
// LCD Menu Messages // LCD Menu Messages
#include LANGUAGE_INCLUDE #include LANGUAGE_INCLUDE