Browse Source

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.
Scott Lahteine 10 years ago
parent
commit
093fedfde8
3 changed files with 593 additions and 478 deletions
  1. 584
    469
      Marlin/ConfigurationStore.cpp
  2. 7
    7
      Marlin/ConfigurationStore.h
  3. 2
    2
      Marlin/Marlin_main.cpp

+ 584
- 469
Marlin/ConfigurationStore.cpp
File diff suppressed because it is too large
View File


+ 7
- 7
Marlin/ConfigurationStore.h View File

@@ -6,17 +6,17 @@
6 6
 void Config_ResetDefault();
7 7
 
8 8
 #ifndef DISABLE_M503
9
-void Config_PrintSettings();
9
+  void Config_PrintSettings(bool forReplay=false);
10 10
 #else
11
-FORCE_INLINE void Config_PrintSettings() {}
11
+  FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {}
12 12
 #endif
13 13
 
14 14
 #ifdef EEPROM_SETTINGS
15
-void Config_StoreSettings();
16
-void Config_RetrieveSettings();
15
+  void Config_StoreSettings();
16
+  void Config_RetrieveSettings();
17 17
 #else
18
-FORCE_INLINE void Config_StoreSettings() {}
19
-FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
18
+  FORCE_INLINE void Config_StoreSettings() {}
19
+  FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
20 20
 #endif
21 21
 
22
-#endif//CONFIG_STORE_H
22
+#endif // __CONFIG_STORE_H

+ 2
- 2
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save