🚸 Wait for cooldown in MarlinUI power-off (#23476)
This commit is contained in:
parent
d7b7b570c7
commit
b435487da7
@ -1553,11 +1553,13 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
|||||||
TERN_(HAS_LCD_MENU, return_to_status());
|
TERN_(HAS_LCD_MENU, return_to_status());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BOTH(PSU_CONTROL, PS_OFF_CONFIRM)
|
#if BOTH(HAS_LCD_MENU, PSU_CONTROL)
|
||||||
|
|
||||||
void MarlinUI::poweroff() {
|
void MarlinUI::poweroff() {
|
||||||
queue.inject(F("M81"));
|
queue.inject(F("M81" TERN_(POWER_OFF_WAIT_FOR_COOLDOWN, "S")));
|
||||||
goto_previous_screen();
|
return_to_status();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void MarlinUI::flow_fault() {
|
void MarlinUI::flow_fault() {
|
||||||
|
@ -373,7 +373,7 @@ public:
|
|||||||
static void resume_print();
|
static void resume_print();
|
||||||
static void flow_fault();
|
static void flow_fault();
|
||||||
|
|
||||||
#if BOTH(PSU_CONTROL, PS_OFF_CONFIRM)
|
#if BOTH(HAS_LCD_MENU, PSU_CONTROL)
|
||||||
static void poweroff();
|
static void poweroff();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ void menu_main() {
|
|||||||
GET_TEXT(MSG_SWITCH_PS_OFF), (const char *)nullptr, PSTR("?")
|
GET_TEXT(MSG_SWITCH_PS_OFF), (const char *)nullptr, PSTR("?")
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
GCODES_ITEM(MSG_SWITCH_PS_OFF, PSTR("M81"));
|
ACTION_ITEM(MSG_SWITCH_PS_OFF, ui.poweroff);
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80"));
|
GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80"));
|
||||||
|
Loading…
Reference in New Issue
Block a user