|
@@ -202,8 +202,6 @@ int bowden_length[4] = {385, 385, 385, 385};
|
|
|
bool is_usb_printing = false;
|
|
|
bool homing_flag = false;
|
|
|
|
|
|
-bool temp_cal_active = false;
|
|
|
-
|
|
|
unsigned long kicktime = _millis()+100000;
|
|
|
|
|
|
unsigned int usb_printing_counter;
|
|
@@ -1465,8 +1463,7 @@ void setup()
|
|
|
|
|
|
if (eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE) == 255) {
|
|
|
eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
|
|
|
- temp_cal_active = false;
|
|
|
- } else temp_cal_active = eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE);
|
|
|
+ }
|
|
|
|
|
|
if (eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA) == 255) {
|
|
|
//eeprom_write_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 0);
|
|
@@ -1474,7 +1471,6 @@ void setup()
|
|
|
int16_t z_shift = 0;
|
|
|
for (uint8_t i = 0; i < 5; i++) EEPROM_save_B(EEPROM_PROBE_TEMP_SHIFT + i * 2, &z_shift);
|
|
|
eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
|
|
|
- temp_cal_active = false;
|
|
|
}
|
|
|
if (eeprom_read_byte((uint8_t*)EEPROM_UVLO) == 255) {
|
|
|
eeprom_write_byte((uint8_t*)EEPROM_UVLO, 0);
|
|
@@ -1547,7 +1543,7 @@ void setup()
|
|
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_BABYSTEP_Z_NOT_SET));
|
|
|
lcd_update_enable(true);
|
|
|
}
|
|
|
- else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && temp_cal_active == true && calibration_status_pinda() == false) {
|
|
|
+ else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda() == false) {
|
|
|
//lcd_show_fullscreen_message_and_wait_P(_i("Temperature calibration has not been run yet"));////MSG_PINDA_NOT_CALIBRATED c=20 r=4
|
|
|
lcd_update_enable(true);
|
|
|
}
|
|
@@ -4827,7 +4823,6 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
|
|
disable_e2();
|
|
|
setTargetBed(0); //set bed target temperature back to 0
|
|
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_TEMP_CALIBRATION_DONE));
|
|
|
- temp_cal_active = true;
|
|
|
eeprom_update_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE, 1);
|
|
|
lcd_update_enable(true);
|
|
|
lcd_update(2);
|
|
@@ -5253,7 +5248,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
|
|
go_home_with_z_lift();
|
|
|
// SERIAL_ECHOLNPGM("Go home finished");
|
|
|
//unretract (after PINDA preheat retraction)
|
|
|
- if (degHotend(active_extruder) > EXTRUDE_MINTEMP && temp_cal_active == true && calibration_status_pinda() == true && target_temperature_bed >= 50) {
|
|
|
+ if ((degHotend(active_extruder) > EXTRUDE_MINTEMP) && eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda() && (target_temperature_bed >= 50)) {
|
|
|
current_position[E_AXIS] += default_retraction;
|
|
|
plan_buffer_line_curposXYZE(400);
|
|
|
}
|
|
@@ -10548,7 +10543,7 @@ float temp_comp_interpolation(float inp_temperature) {
|
|
|
#ifdef PINDA_THERMISTOR
|
|
|
float temp_compensation_pinda_thermistor_offset(float temperature_pinda)
|
|
|
{
|
|
|
- if (!temp_cal_active) return 0;
|
|
|
+ if (!eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE)) return 0;
|
|
|
if (!calibration_status_pinda()) return 0;
|
|
|
return temp_comp_interpolation(temperature_pinda) / cs.axis_steps_per_unit[Z_AXIS];
|
|
|
}
|