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