information that temp calibration active is active is stored to eeprom

This commit is contained in:
PavelSindler 2017-04-06 19:56:01 +02:00
parent ccdf5e9c41
commit fab71ff7cf
3 changed files with 4 additions and 1 deletions

View file

@ -45,6 +45,7 @@
#define EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY (EEPROM_BED_CORRECTION_REAR-1)
#define EEPROM_PRINT_FLAG (EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY-1)
#define EEPROM_PROBE_TEMP_SHIFT (EEPROM_PRINT_FLAG - 2*5) //5 x int for storing pinda probe temp shift relative to 50 C; unit: motor steps
#define EEPROM_TEMP_CAL_ACTIVE (EEPROM_PROBE_TEMP_SHIFT - 1)
// Currently running firmware, each digit stored as uint16_t.
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.

View file

@ -1141,6 +1141,7 @@ void setup()
// 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);
}
// In the future, somewhere here would one compare the current firmware version against the firmware version stored in the EEPROM.
@ -1150,7 +1151,7 @@ void setup()
if (lang_selected >= LANG_NUM){
lcd_mylang();
}
temp_cal_active = eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE);
check_babystep(); //checking if Z babystep is in allowed range
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||

View file

@ -2245,6 +2245,7 @@ void lcd_pinda_calibration_menu()
void lcd_temp_calibration_set() {
temp_cal_active = !temp_cal_active;
eeprom_update_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE, temp_cal_active);
digipot_init();
lcd_goto_menu(lcd_pinda_calibration_menu, 2);
}