Browse Source

🚸 Wait for cooldown in MarlinUI power-off (#23476)

FB4S_WIFI
mistic100 3 years ago
committed by Scott Lahteine
parent
commit
b435487da7
  1. 8
      Marlin/src/lcd/marlinui.cpp
  2. 2
      Marlin/src/lcd/marlinui.h
  3. 2
      Marlin/src/lcd/menu/menu_main.cpp

8
Marlin/src/lcd/marlinui.cpp

@ -1553,11 +1553,13 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
TERN_(HAS_LCD_MENU, return_to_status());
}
#if BOTH(PSU_CONTROL, PS_OFF_CONFIRM)
#if BOTH(HAS_LCD_MENU, PSU_CONTROL)
void MarlinUI::poweroff() {
queue.inject(F("M81"));
goto_previous_screen();
queue.inject(F("M81" TERN_(POWER_OFF_WAIT_FOR_COOLDOWN, "S")));
return_to_status();
}
#endif
void MarlinUI::flow_fault() {

2
Marlin/src/lcd/marlinui.h

@ -373,7 +373,7 @@ public:
static void resume_print();
static void flow_fault();
#if BOTH(PSU_CONTROL, PS_OFF_CONFIRM)
#if BOTH(HAS_LCD_MENU, PSU_CONTROL)
static void poweroff();
#endif

2
Marlin/src/lcd/menu/menu_main.cpp

@ -380,7 +380,7 @@ void menu_main() {
GET_TEXT(MSG_SWITCH_PS_OFF), (const char *)nullptr, PSTR("?")
);
#else
GCODES_ITEM(MSG_SWITCH_PS_OFF, PSTR("M81"));
ACTION_ITEM(MSG_SWITCH_PS_OFF, ui.poweroff);
#endif
else
GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80"));

Loading…
Cancel
Save