From f724ef58202603c4e2735c5bd9796889b81c3dfb Mon Sep 17 00:00:00 2001 From: Robert Kirk Date: Sun, 18 Dec 2016 15:23:40 -0500 Subject: [PATCH 1/2] Have bed leveling status output current status, not requested. --- Marlin/Marlin_main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4163c252b8..033f121ed1 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -7030,20 +7030,21 @@ void quickstop_stepper() { if (code_seen('Z')) set_z_fade_height(code_value_linear_units()); #endif - if (to_enable && !( + const bool new_status = #if ENABLED(MESH_BED_LEVELING) mbl.active() #else planner.abl_enabled #endif - ) ) { - to_enable = false; + ; + + if (to_enable && !new_status) { SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_M420_FAILED); } SERIAL_ECHO_START; - SERIAL_ECHOLNPAIR("Bed Leveling ", to_enable ? MSG_ON : MSG_OFF); + SERIAL_ECHOLNPAIR("Bed Leveling ", new_status ? MSG_ON : MSG_OFF); // V to print the matrix or mesh if (code_seen('V')) { From 6d6a1db6ec61782dddd9d2ad5d768ad80d40091e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 19 Dec 2016 18:50:43 -0800 Subject: [PATCH 2/2] Apply const to _EEPROM_writeData value param --- Marlin/configuration_store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index a6a2b7330c..05ba0c4e34 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -183,7 +183,7 @@ void Config_Postprocess() { bool eeprom_write_error; - void _EEPROM_writeData(int &pos, uint8_t* value, uint16_t size) { + void _EEPROM_writeData(int &pos, const uint8_t* value, uint16_t size) { if (eeprom_write_error) return; while (size--) { uint8_t * const p = (uint8_t * const)pos;