From fb379384ee79eabb42b8edad06e4588b84cb9544 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Apr 2015 21:06:04 -0700 Subject: [PATCH] Reduce MBL eeprom read code --- Marlin/configuration_store.cpp | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 318501db6..0cd7faa7c 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -325,30 +325,21 @@ void Config_RetrieveSettings() { EEPROM_READ_VAR(i, max_e_jerk); EEPROM_READ_VAR(i, home_offset); - uint8_t mesh_num_x = 0; - uint8_t mesh_num_y = 0; + uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0; + EEPROM_READ_VAR(i, dummy_uint8); + EEPROM_READ_VAR(i, mesh_num_x); + EEPROM_READ_VAR(i, mesh_num_y); #ifdef MESH_BED_LEVELING - EEPROM_READ_VAR(i, mbl.active); - EEPROM_READ_VAR(i, mesh_num_x); - EEPROM_READ_VAR(i, mesh_num_y); - if (mesh_num_x != MESH_NUM_X_POINTS || - mesh_num_y != MESH_NUM_Y_POINTS) { - mbl.reset(); - for (int q=0; q