From 97115d56f9aa2291ea8c968b9934b42e58232cc6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 28 Oct 2016 18:53:48 -0500 Subject: [PATCH] Print error for M500 with disabled EEPROM --- Marlin/configuration_store.cpp | 9 ++++++++- Marlin/configuration_store.h | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 2150d0128..8e97a6900 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -565,7 +565,14 @@ void Config_RetrieveSettings() { #endif } -#endif // EEPROM_SETTINGS +#else // !EEPROM_SETTINGS + + void Config_StoreSettings() { + SERIAL_ERROR_START; + SERIAL_ERRORLNPGM("EEPROM disabled"); + } + +#endif // !EEPROM_SETTINGS /** * M502 - Reset Configuration diff --git a/Marlin/configuration_store.h b/Marlin/configuration_store.h index 891f19fb9..7279dc4d5 100644 --- a/Marlin/configuration_store.h +++ b/Marlin/configuration_store.h @@ -26,6 +26,7 @@ #include "MarlinConfig.h" void Config_ResetDefault(); +void Config_StoreSettings(); #if DISABLED(DISABLE_M503) void Config_PrintSettings(bool forReplay=false); @@ -34,10 +35,8 @@ void Config_ResetDefault(); #endif #if ENABLED(EEPROM_SETTINGS) - void Config_StoreSettings(); void Config_RetrieveSettings(); #else - FORCE_INLINE void Config_StoreSettings() {} FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); } #endif