TM: Restore extruder autofan state when stopping/resuming
During thermal errors all fans are set to full speed. When the print is resumed or stopped *and* the thermal error is gone, also restore the autofan state. Fixes #3893
This commit is contained in:
parent
204df90d6d
commit
7529652dca
|
|
@ -294,3 +294,13 @@ void hotendFanSetFullSpeed()
|
||||||
#endif //FAN_SOFT_PWM
|
#endif //FAN_SOFT_PWM
|
||||||
fanSpeed = 255;
|
fanSpeed = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hotendDefaultAutoFanState()
|
||||||
|
{
|
||||||
|
#if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1)
|
||||||
|
#ifdef EXTRUDER_ALTFAN_DETECT
|
||||||
|
altfanStatus.altfanOverride = eeprom_read_byte((uint8_t*)EEPROM_ALTFAN_OVERRIDE);
|
||||||
|
#endif
|
||||||
|
setExtruderAutoFanState(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,3 +33,4 @@ void checkExtruderAutoFans();
|
||||||
|
|
||||||
void checkFans();
|
void checkFans();
|
||||||
void hotendFanSetFullSpeed();
|
void hotendFanSetFullSpeed();
|
||||||
|
void hotendDefaultAutoFanState();
|
||||||
|
|
|
||||||
|
|
@ -5256,7 +5256,12 @@ void lcd_resume_print()
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
custom_message_type = CustomMsg::Resuming;
|
custom_message_type = CustomMsg::Resuming;
|
||||||
isPrintPaused = false;
|
isPrintPaused = false;
|
||||||
Stopped = false; // resume processing USB commands again
|
|
||||||
|
// resume processing USB commands again and restore hotend fan state (in case the print was
|
||||||
|
// stopped due to a thermal error)
|
||||||
|
hotendDefaultAutoFanState();
|
||||||
|
Stopped = false;
|
||||||
|
|
||||||
restore_print_from_ram_and_continue(default_retraction);
|
restore_print_from_ram_and_continue(default_retraction);
|
||||||
pause_time += (_millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
|
pause_time += (_millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
|
||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
|
|
@ -5884,6 +5889,9 @@ void lcd_print_stop_finish()
|
||||||
} else {
|
} else {
|
||||||
// Turn off the print fan
|
// Turn off the print fan
|
||||||
fanSpeed = 0;
|
fanSpeed = 0;
|
||||||
|
|
||||||
|
// restore the auto hotend state
|
||||||
|
hotendDefaultAutoFanState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament())
|
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue