Refuse to run TM calibration if the printer is not idle
This commit is contained in:
parent
9c971b1b89
commit
ea0840dee9
|
|
@ -358,6 +358,8 @@ extern LongTimer safetyTimer;
|
|||
#define PRINT_PERCENT_DONE_INIT 0xff
|
||||
#define PRINTER_ACTIVE (IS_SD_PRINTING || usb_timer.running() || isPrintPaused || (custom_message_type == CustomMsg::TempCal) || saved_printing || (lcd_commands_type == LcdCommands::Layer1Cal) || mmu_print_saved || homing_flag || mesh_bed_leveling_flag)
|
||||
|
||||
extern bool printer_active();
|
||||
|
||||
//! Beware - mcode_in_progress is set as soon as the command gets really processed,
|
||||
//! which is not the same as posting the M600 command into the command queue
|
||||
//! There can be a considerable lag between posting M600 and its real processing which might result
|
||||
|
|
|
|||
|
|
@ -572,6 +572,10 @@ void servo_init()
|
|||
#endif
|
||||
}
|
||||
|
||||
bool printer_active()
|
||||
{
|
||||
return PRINTER_ACTIVE;
|
||||
}
|
||||
|
||||
bool fans_check_enabled = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -2838,7 +2838,11 @@ bool autotune(int16_t cal_temp)
|
|||
|
||||
void temp_model_autotune(int16_t temp)
|
||||
{
|
||||
// TODO: ensure printer is idle/queue empty/buffer empty
|
||||
if(moves_planned() || printer_active()) {
|
||||
SERIAL_ECHOLNPGM("TM: printer needs to be idle for calibration");
|
||||
return;
|
||||
}
|
||||
|
||||
KEEPALIVE_STATE(IN_PROCESS);
|
||||
|
||||
// disable the model checking during self-calibration
|
||||
|
|
|
|||
Loading…
Reference in New Issue