From 4de9b1c9f6d7a043b476fcd2f6d7a63aa12d966a Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 13 Apr 2017 16:15:34 +0200 Subject: [PATCH] temp calibration on/off initialization when updating firmware --- Firmware/Marlin_main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 753f1a40..36264597 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1151,10 +1151,10 @@ void setup() // Once a firmware boots up, it forces at least a language selection, which changes // EEPROM_LANG to number lower than 0x0ff. // 1) Set a high power mode. - eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0); - eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0); + eeprom_write_byte((uint8_t*)EEPROM_SILENT, 0); } + // In the future, somewhere here would one compare the current firmware version against the firmware version stored in the EEPROM. // If they differ, an update procedure may need to be performed. At the end of this block, the current firmware version // is being written into the EEPROM, so the update procedure will be triggered only once. @@ -1163,6 +1163,10 @@ void setup() lcd_mylang(); } temp_cal_active = eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE); + if (temp_cal_active == 0xFF) { + eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0); + temp_cal_active = 0; + } check_babystep(); //checking if Z babystep is in allowed range if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||