From d51b2666ac850003faffb8b55749a70a742af26d Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 26 Jul 2018 19:09:52 +0200 Subject: [PATCH] no levels used in store settings function --- Firmware/ConfigurationStore.cpp | 18 ++++-------------- Firmware/ConfigurationStore.h | 4 ++-- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Firmware/ConfigurationStore.cpp b/Firmware/ConfigurationStore.cpp index a63f767b..0345ba39 100644 --- a/Firmware/ConfigurationStore.cpp +++ b/Firmware/ConfigurationStore.cpp @@ -50,7 +50,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) #define EEPROM_VERSION "V2" #ifdef EEPROM_SETTINGS -void Config_StoreSettings(uint16_t offset, uint8_t level) +void Config_StoreSettings(uint16_t offset) { char ver[4]= "000"; int i = offset; @@ -119,12 +119,7 @@ void Config_StoreSettings(uint16_t offset, uint8_t level) #endif #endif -#ifdef LIN_ADVANCE - if (level >= 10) { - EEPROM_WRITE_VAR(i, extruder_advance_k); - EEPROM_WRITE_VAR(i, advance_ed_ratio); - } -#endif //LIN_ADVANCE + EEPROM_WRITE_VAR(i,max_feedrate_silent); EEPROM_WRITE_VAR(i,max_acceleration_units_per_sq_second_silent); @@ -225,7 +220,7 @@ void Config_PrintSettings(uint8_t level) #ifdef EEPROM_SETTINGS -bool Config_RetrieveSettings(uint16_t offset, uint8_t level) +bool Config_RetrieveSettings(uint16_t offset) { int i=offset; bool previous_settings_retrieved = true; @@ -302,12 +297,7 @@ bool Config_RetrieveSettings(uint16_t offset, uint8_t level) EEPROM_READ_VAR(i, filament_size[2]); #endif #endif -#ifdef LIN_ADVANCE - if (level >= 10) { - EEPROM_READ_VAR(i, extruder_advance_k); - EEPROM_READ_VAR(i, advance_ed_ratio); - } -#endif //LIN_ADVANCE + calculate_extruder_multipliers(); EEPROM_READ_VAR(i,max_feedrate_silent); diff --git a/Firmware/ConfigurationStore.h b/Firmware/ConfigurationStore.h index 79055fdc..43001a47 100644 --- a/Firmware/ConfigurationStore.h +++ b/Firmware/ConfigurationStore.h @@ -13,8 +13,8 @@ FORCE_INLINE void Config_PrintSettings() {} #endif #ifdef EEPROM_SETTINGS -void Config_StoreSettings(uint16_t offset, uint8_t level = 0); -bool Config_RetrieveSettings(uint16_t offset, uint8_t level = 0); +void Config_StoreSettings(uint16_t offset); +bool Config_RetrieveSettings(uint16_t offset); #else FORCE_INLINE void Config_StoreSettings() {} FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }