Browse Source

Print error for M500 with disabled EEPROM

Scott Lahteine 7 years ago
parent
commit
97115d56f9
2 changed files with 9 additions and 3 deletions
  1. 8
    1
      Marlin/configuration_store.cpp
  2. 1
    2
      Marlin/configuration_store.h

+ 8
- 1
Marlin/configuration_store.cpp View File

565
   #endif
565
   #endif
566
 }
566
 }
567
 
567
 
568
-#endif // EEPROM_SETTINGS
568
+#else // !EEPROM_SETTINGS
569
+
570
+  void Config_StoreSettings() {
571
+    SERIAL_ERROR_START;
572
+    SERIAL_ERRORLNPGM("EEPROM disabled");
573
+  }
574
+
575
+#endif // !EEPROM_SETTINGS
569
 
576
 
570
 /**
577
 /**
571
  * M502 - Reset Configuration
578
  * M502 - Reset Configuration

+ 1
- 2
Marlin/configuration_store.h View File

26
 #include "MarlinConfig.h"
26
 #include "MarlinConfig.h"
27
 
27
 
28
 void Config_ResetDefault();
28
 void Config_ResetDefault();
29
+void Config_StoreSettings();
29
 
30
 
30
 #if DISABLED(DISABLE_M503)
31
 #if DISABLED(DISABLE_M503)
31
   void Config_PrintSettings(bool forReplay=false);
32
   void Config_PrintSettings(bool forReplay=false);
34
 #endif
35
 #endif
35
 
36
 
36
 #if ENABLED(EEPROM_SETTINGS)
37
 #if ENABLED(EEPROM_SETTINGS)
37
-  void Config_StoreSettings();
38
   void Config_RetrieveSettings();
38
   void Config_RetrieveSettings();
39
 #else
39
 #else
40
-  FORCE_INLINE void Config_StoreSettings() {}
41
   FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
40
   FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
42
 #endif
41
 #endif
43
 
42
 

Loading…
Cancel
Save