|
@@ -1181,6 +1181,10 @@ void setup()
|
|
|
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);
|
|
|
+ }
|
|
|
+
|
|
|
check_babystep(); //checking if Z babystep is in allowed range
|
|
|
|
|
|
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
|
@@ -1193,7 +1197,7 @@ void setup()
|
|
|
// Show the message.
|
|
|
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
|
|
|
lcd_update_enable(true);
|
|
|
- } else if (calibration_status() == CALIBRATION_STATUS_PINDA && temp_cal_active == true) {
|
|
|
+ } else if (calibration_status() == CALIBRATION_STATUS_CALIBRATED && temp_cal_active == true && calibration_status_pinda() == false) {
|
|
|
lcd_show_fullscreen_message_and_wait_P(MSG_PINDA_NOT_CALIBRATED);
|
|
|
lcd_update_enable(true);
|
|
|
} else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
|
|
@@ -2786,7 +2790,7 @@ void process_commands()
|
|
|
|
|
|
//enquecommand_P(PSTR("M190 S50"));
|
|
|
for (int i = 0; i < PINDA_HEAT_T; i++) delay_keep_alive(1000);
|
|
|
- calibration_status_store(CALIBRATION_STATUS_PINDA); //invalidate temp. calibration in case that in will be aborted during the calibration process
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 0); //invalidate temp. calibration in case that in will be aborted during the calibration process
|
|
|
|
|
|
current_position[Z_AXIS] = 5;
|
|
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
|
|
@@ -2840,7 +2844,7 @@ void process_commands()
|
|
|
custom_message_type = 0;
|
|
|
custom_message = false;
|
|
|
|
|
|
- calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 1);
|
|
|
lcd_show_fullscreen_message_and_wait_P(MSG_TEMP_CALIBRATION_DONE);
|
|
|
lcd_update_enable(true);
|
|
|
lcd_update(2);
|
|
@@ -2915,7 +2919,7 @@ void process_commands()
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- if (run == false && card.sdprinting == true && temp_cal_active == true && calibration_status() < CALIBRATION_STATUS_PINDA) {
|
|
|
+ if (run == false && card.sdprinting == true && temp_cal_active == true && calibration_status_pinda() == true) {
|
|
|
temp_compensation_start();
|
|
|
run = true;
|
|
|
repeatcommand_front(); // repeat G80 with all its parameters
|
|
@@ -3062,7 +3066,7 @@ void process_commands()
|
|
|
}
|
|
|
clean_up_after_endstop_move();
|
|
|
SERIAL_ECHOLNPGM("clean up finished ");
|
|
|
- if(temp_cal_active == true && calibration_status() < CALIBRATION_STATUS_PINDA) temp_compensation_apply(); //apply PINDA temperature compensation
|
|
|
+ if(temp_cal_active == true && calibration_status_pinda() == true) temp_compensation_apply(); //apply PINDA temperature compensation
|
|
|
babystep_apply(); // Apply Z height correction aka baby stepping before mesh bed leveing gets activated.
|
|
|
SERIAL_ECHOLNPGM("babystep applied");
|
|
|
bool eeprom_bed_correction_valid = eeprom_read_byte((unsigned char*)EEPROM_BED_CORRECTION_VALID) == 1;
|
|
@@ -3128,7 +3132,7 @@ void process_commands()
|
|
|
go_home_with_z_lift();
|
|
|
SERIAL_ECHOLNPGM("Go home finished");
|
|
|
//unretract (after PINDA preheat retraction)
|
|
|
- if (card.sdprinting == true && degHotend(active_extruder) > EXTRUDE_MINTEMP && temp_cal_active == true) {
|
|
|
+ if (card.sdprinting == true && degHotend(active_extruder) > EXTRUDE_MINTEMP && temp_cal_active == true && calibration_status_pinda() == true) {
|
|
|
current_position[E_AXIS] += DEFAULT_RETRACTION;
|
|
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400, active_extruder);
|
|
|
}
|
|
@@ -3236,7 +3240,7 @@ void process_commands()
|
|
|
* This G-code will be performed at the end of a calibration script.
|
|
|
*/
|
|
|
case 87:
|
|
|
- calibration_status_store(CALIBRATION_STATUS_PINDA);
|
|
|
+ calibration_status_store(CALIBRATION_STATUS_CALIBRATED);
|
|
|
break;
|
|
|
|
|
|
/**
|