🎨 Standard 'cooldown' method

This commit is contained in:
Scott Lahteine
2021-10-27 21:36:06 -05:00
committed by Scott Lahteine
parent 205d867e4b
commit d29a9014f2
8 changed files with 31 additions and 41 deletions

View File

@ -1787,8 +1787,7 @@ void DWIN_Print_Started(const bool sd) {
// Ended print job
void DWIN_Print_Finished() {
if (checkkey == PrintProcess || printingIsActive()) {
thermalManager.disable_all_heaters();
thermalManager.zero_fan_speeds();
thermalManager.cooldown();
HMI_flag.print_finish = true;
}
}
@ -2116,17 +2115,13 @@ void SetHome() {
#endif
#if HAS_PREHEAT
void SetCoolDown() {
TERN_(HAS_FAN, thermalManager.zero_fan_speeds());
#if HAS_HOTEND || HAS_HEATED_BED
thermalManager.disable_all_heaters();
#endif
}
void DoPreheat0() { ui.preheat_all(0); }
void DoPreheat1() { ui.preheat_all(1); }
void DoPreheat2() { ui.preheat_all(2); }
#endif
void DoCoolDown() { thermalManager.cooldown(); }
void SetLanguage() {
HMI_ToggleLanguage();
CurrentMenu = nullptr; // Invalidate menu to full redraw
@ -3126,8 +3121,8 @@ void Draw_Prepare_Menu() {
#if PREHEAT_COUNT > 2
ADDMENUITEM(ICON_CustomPreheat, GET_TEXT_F(MSG_PREHEAT_CUSTOM), onDrawMenuItem, DoPreheat2);
#endif
ADDMENUITEM(ICON_Cool, GET_TEXT_F(MSG_COOLDOWN), onDrawCooldown, SetCoolDown);
#endif
ADDMENUITEM(ICON_Cool, GET_TEXT_F(MSG_COOLDOWN), onDrawCooldown, DoCoolDown);
ADDMENUITEM(ICON_Language, PSTR("UI Language"), onDrawLanguage, SetLanguage);
}
CurrentMenu->draw();