|
@@ -58,7 +58,7 @@
|
58
|
58
|
#include "../../feature/password/password.h"
|
59
|
59
|
#endif
|
60
|
60
|
|
61
|
|
-#if ENABLED(HOST_START_MENU_ITEM) && defined(ACTION_ON_START)
|
|
61
|
+#if (ENABLED(HOST_START_MENU_ITEM) && defined(ACTION_ON_START)) || (ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION))
|
62
|
62
|
#include "../../feature/host_actions.h"
|
63
|
63
|
#endif
|
64
|
64
|
|
|
@@ -128,8 +128,7 @@ void menu_configuration();
|
128
|
128
|
#define _CUSTOM_ITEM_MAIN_CONFIRM(N) \
|
129
|
129
|
SUBMENU_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), []{ \
|
130
|
130
|
MenuItem_confirm::confirm_screen( \
|
131
|
|
- GCODE_LAMBDA_MAIN(N), \
|
132
|
|
- ui.goto_previous_screen, \
|
|
131
|
+ GCODE_LAMBDA_MAIN(N), nullptr, \
|
133
|
132
|
PSTR(MAIN_MENU_ITEM_##N##_DESC "?") \
|
134
|
133
|
); \
|
135
|
134
|
})
|
|
@@ -274,7 +273,7 @@ void menu_main() {
|
274
|
273
|
SUBMENU(MSG_STOP_PRINT, []{
|
275
|
274
|
MenuItem_confirm::select_screen(
|
276
|
275
|
GET_TEXT(MSG_BUTTON_STOP), GET_TEXT(MSG_BACK),
|
277
|
|
- ui.abort_print, ui.goto_previous_screen,
|
|
276
|
+ ui.abort_print, nullptr,
|
278
|
277
|
GET_TEXT(MSG_STOP_PRINT), (const char *)nullptr, PSTR("?")
|
279
|
278
|
);
|
280
|
279
|
});
|
|
@@ -346,7 +345,7 @@ void menu_main() {
|
346
|
345
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
347
|
346
|
#if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
348
|
347
|
YESNO_ITEM(MSG_FILAMENTCHANGE,
|
349
|
|
- menu_change_filament, ui.goto_previous_screen,
|
|
348
|
+ menu_change_filament, nullptr,
|
350
|
349
|
GET_TEXT(MSG_FILAMENTCHANGE), (const char *)nullptr, PSTR("?")
|
351
|
350
|
);
|
352
|
351
|
#else
|
|
@@ -370,7 +369,7 @@ void menu_main() {
|
370
|
369
|
#if ENABLED(PS_OFF_CONFIRM)
|
371
|
370
|
CONFIRM_ITEM(MSG_SWITCH_PS_OFF,
|
372
|
371
|
MSG_YES, MSG_NO,
|
373
|
|
- ui.poweroff, ui.goto_previous_screen,
|
|
372
|
+ ui.poweroff, nullptr,
|
374
|
373
|
GET_TEXT(MSG_SWITCH_PS_OFF), (const char *)nullptr, PSTR("?")
|
375
|
374
|
);
|
376
|
375
|
#else
|
|
@@ -394,21 +393,21 @@ void menu_main() {
|
394
|
393
|
#if SERVICE_INTERVAL_1 > 0
|
395
|
394
|
CONFIRM_ITEM_P(PSTR(SERVICE_NAME_1),
|
396
|
395
|
MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
|
397
|
|
- []{ _service_reset(1); }, ui.goto_previous_screen,
|
|
396
|
+ []{ _service_reset(1); }, nullptr,
|
398
|
397
|
GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_1), PSTR("?")
|
399
|
398
|
);
|
400
|
399
|
#endif
|
401
|
400
|
#if SERVICE_INTERVAL_2 > 0
|
402
|
401
|
CONFIRM_ITEM_P(PSTR(SERVICE_NAME_2),
|
403
|
402
|
MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
|
404
|
|
- []{ _service_reset(2); }, ui.goto_previous_screen,
|
|
403
|
+ []{ _service_reset(2); }, nullptr,
|
405
|
404
|
GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_2), PSTR("?")
|
406
|
405
|
);
|
407
|
406
|
#endif
|
408
|
407
|
#if SERVICE_INTERVAL_3 > 0
|
409
|
408
|
CONFIRM_ITEM_P(PSTR(SERVICE_NAME_3),
|
410
|
409
|
MSG_BUTTON_RESET, MSG_BUTTON_CANCEL,
|
411
|
|
- []{ _service_reset(3); }, ui.goto_previous_screen,
|
|
410
|
+ []{ _service_reset(3); }, nullptr,
|
412
|
411
|
GET_TEXT(MSG_SERVICE_RESET), F(SERVICE_NAME_3), PSTR("?")
|
413
|
412
|
);
|
414
|
413
|
#endif
|
|
@@ -442,6 +441,16 @@ void menu_main() {
|
442
|
441
|
SUBMENU(LANGUAGE, menu_language);
|
443
|
442
|
#endif
|
444
|
443
|
|
|
444
|
+ #if ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION)
|
|
445
|
+ SUBMENU(MSG_HOST_SHUTDOWN, []{
|
|
446
|
+ MenuItem_confirm::select_screen(
|
|
447
|
+ GET_TEXT(MSG_BUTTON_PROCEED), GET_TEXT(MSG_BUTTON_CANCEL),
|
|
448
|
+ []{ ui.return_to_status(); hostui.shutdown(); }, nullptr,
|
|
449
|
+ GET_TEXT(MSG_HOST_SHUTDOWN), (const char *)nullptr, PSTR("?")
|
|
450
|
+ );
|
|
451
|
+ });
|
|
452
|
+ #endif
|
|
453
|
+
|
445
|
454
|
END_MENU();
|
446
|
455
|
}
|
447
|
456
|
|