temp calibration on/off initialization when updating firmware

This commit is contained in:
PavelSindler 2017-04-13 16:15:34 +02:00
parent 70b6e13de4
commit 4de9b1c9f6

View file

@ -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 ||