From 2f8d1457528a1f72a5c03a25645c601f60b82c25 Mon Sep 17 00:00:00 2001 From: ellensp Date: Thu, 10 Dec 2020 20:39:43 +1300 Subject: [PATCH 1/2] fix debug messages --- Marlin/src/module/settings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index c6eee271a08f..db96dd850ce3 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -563,7 +563,7 @@ void MarlinSettings::postprocess() { "ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE is insufficient to capture all EEPROM data."); #endif -//#define DEBUG_OUT 1 +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" #if ENABLED(EEPROM_SETTINGS) @@ -571,7 +571,7 @@ void MarlinSettings::postprocess() { #define EEPROM_START() if (!persistentStore.access_start()) { SERIAL_ECHO_MSG("No EEPROM."); return false; } \ int eeprom_index = EEPROM_OFFSET #define EEPROM_FINISH() persistentStore.access_finish() - #define EEPROM_SKIP(VAR) (eeprom_index += sizeof(VAR)) + #define EEPROM_SKI(VAR) (eeprom_index += sizeof(VAR)) #define EEPROM_WRITE(VAR) do{ persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) #define EEPROM_READ(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating); }while(0) #define EEPROM_READ_ALWAYS(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) @@ -2294,14 +2294,14 @@ void MarlinSettings::postprocess() { if (!ubl.sanity_check()) { SERIAL_EOL(); - #if ENABLED(EEPROM_CHITCHAT) + #if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) ubl.echo_name(); DEBUG_ECHOLNPGM(" initialized.\n"); #endif } else { eeprom_error = true; - #if ENABLED(EEPROM_CHITCHAT) + #if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) DEBUG_ECHOPGM("?Can't enable "); ubl.echo_name(); DEBUG_ECHOLNPGM("."); From ed484f00a3cfe68c5f7b6de9e9cd0062c1e244e0 Mon Sep 17 00:00:00 2001 From: ellensp Date: Thu, 10 Dec 2020 20:43:53 +1300 Subject: [PATCH 2/2] correct missing character --- Marlin/src/module/settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index db96dd850ce3..ec549ea2f66f 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -571,7 +571,7 @@ void MarlinSettings::postprocess() { #define EEPROM_START() if (!persistentStore.access_start()) { SERIAL_ECHO_MSG("No EEPROM."); return false; } \ int eeprom_index = EEPROM_OFFSET #define EEPROM_FINISH() persistentStore.access_finish() - #define EEPROM_SKI(VAR) (eeprom_index += sizeof(VAR)) + #define EEPROM_SKIP(VAR) (eeprom_index += sizeof(VAR)) #define EEPROM_WRITE(VAR) do{ persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) #define EEPROM_READ(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating); }while(0) #define EEPROM_READ_ALWAYS(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0)