|
|
|
@ -58,7 +58,7 @@
|
|
|
|
|
#include "../../feature/password/password.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(HOST_START_MENU_ITEM) && defined(ACTION_ON_START)
|
|
|
|
|
#if (ENABLED(HOST_START_MENU_ITEM) && defined(ACTION_ON_START)) || (ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION))
|
|
|
|
|
#include "../../feature/host_actions.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -128,8 +128,7 @@ void menu_configuration();
|
|
|
|
|
#define _CUSTOM_ITEM_MAIN_CONFIRM(N) \
|
|
|
|
|
SUBMENU_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), []{ \
|
|
|
|
|
MenuItem_confirm::confirm_screen( \
|
|
|
|
|
GCODE_LAMBDA_MAIN(N), \
|
|
|
|
|
ui.goto_previous_screen, \
|
|
|
|
|
GCODE_LAMBDA_MAIN(N), nullptr, \
|
|
|
|
|
PSTR(MAIN_MENU_ITEM_##N##_DESC "?") \
|
|
|
|
|
); \
|
|
|
|
|
})
|
|
|
|
@ -274,7 +273,7 @@ void menu_main() {
|
|
|
|
|
SUBMENU(MSG_STOP_PRINT, []{
|
|
|
|
|
MenuItem_confirm::select_screen(
|
|
|
|
|
GET_TEXT(MSG_BUTTON_STOP), GET_TEXT(MSG_BACK),
|
|
|
|
|
ui.abort_print, ui.goto_previous_screen,
|
|
|
|
|
ui.abort_print, nullptr,
|
|
|
|
|
GET_TEXT(MSG_STOP_PRINT), (const char *)nullptr, PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
@ -346,7 +345,7 @@ void menu_main() {
|
|
|
|
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
|
|
|
|
#if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
|
|
|
|
YESNO_ITEM(MSG_FILAMENTCHANGE,
|
|
|
|
|
menu_change_filament, ui.goto_previous_screen,
|
|
|
|
|
menu_change_filament, nullptr,
|
|
|
|
|
GET_TEXT(MSG_FILAMENTCHANGE), (const char *)nullptr, PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
#else
|
|
|
|
@ -370,7 +369,7 @@ void menu_main() {
|
|
|
|
|
#if ENABLED(PS_OFF_CONFIRM)
|
|
|
|
|
CONFIRM_ITEM(MSG_SWITCH_PS_OFF,
|
|
|
|
|
MSG_YES, MSG_NO,
|
|
|
|
|
ui.poweroff, ui.goto_previous_screen,
|
|
|
|
|
ui.poweroff, nullptr,
|
|
|
|
|
GET_TEXT(MSG_SWITCH_PS_OFF), (const char *)nullptr, PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
#else
|
|
|
|
@ -394,21 +393,21 @@ void menu_main() {
|
|
|
|
|
#if SERVICE_INTERVAL_1 > 0
|
|
|
|
|
CONFIRM_ITEM_P(PSTR(SERVICE_NAME_1),
|
|
|
|
|
MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
|
|
|
|
|
[]{ _service_reset(1); }, ui.goto_previous_screen,
|
|
|
|
|
[]{ _service_reset(1); }, nullptr,
|
|
|
|
|
GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_1), PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
#endif
|
|
|
|
|
#if SERVICE_INTERVAL_2 > 0
|
|
|
|
|
CONFIRM_ITEM_P(PSTR(SERVICE_NAME_2),
|
|
|
|
|
MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
|
|
|
|
|
[]{ _service_reset(2); }, ui.goto_previous_screen,
|
|
|
|
|
[]{ _service_reset(2); }, nullptr,
|
|
|
|
|
GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_2), PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
#endif
|
|
|
|
|
#if SERVICE_INTERVAL_3 > 0
|
|
|
|
|
CONFIRM_ITEM_P(PSTR(SERVICE_NAME_3),
|
|
|
|
|
MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
|
|
|
|
|
[]{ _service_reset(3); }, ui.goto_previous_screen,
|
|
|
|
|
[]{ _service_reset(3); }, nullptr,
|
|
|
|
|
GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_3), PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
#endif
|
|
|
|
@ -442,6 +441,16 @@ void menu_main() {
|
|
|
|
|
SUBMENU(LANGUAGE, menu_language);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION)
|
|
|
|
|
SUBMENU(MSG_HOST_SHUTDOWN, []{
|
|
|
|
|
MenuItem_confirm::select_screen(
|
|
|
|
|
GET_TEXT(MSG_BUTTON_PROCEED), GET_TEXT(MSG_BUTTON_CANCEL),
|
|
|
|
|
[]{ ui.return_to_status(); hostui.shutdown(); }, nullptr,
|
|
|
|
|
GET_TEXT(MSG_HOST_SHUTDOWN), (const char *)nullptr, PSTR("?")
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
END_MENU();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|