Preheat Menu shortcut option (#20350)

This commit is contained in:
Vi B-P 2021-02-25 11:23:17 -05:00 committed by GitHub
parent bcda46e3f3
commit f7d9305786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 1 deletions

View File

@ -1147,6 +1147,9 @@
#endif #endif
#endif #endif
// Insert a menu for preheating at the top level to allow for quick access
//#define PREHEAT_SHORTCUT_MENU_ITEM
#endif // HAS_LCD_MENU #endif // HAS_LCD_MENU
#if HAS_DISPLAY #if HAS_DISPLAY

View File

@ -2380,6 +2380,10 @@
#endif #endif
#endif #endif
#if !PREHEAT_COUNT
#undef PREHEAT_SHORTCUT_MENU_ITEM
#endif
/** /**
* Up to 3 PWM fans * Up to 3 PWM fans
*/ */

View File

@ -97,6 +97,10 @@ void menu_configuration();
void menu_spindle_laser(); void menu_spindle_laser();
#endif #endif
#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)
void menu_preheat_only();
#endif
#if HAS_MULTI_LANGUAGE #if HAS_MULTI_LANGUAGE
void menu_language(); void menu_language();
#endif #endif
@ -177,6 +181,10 @@ void menu_main() {
ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start); ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start);
#endif #endif
#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)
SUBMENU(MSG_PREHEAT_CUSTOM, menu_preheat_only);
#endif
SUBMENU(MSG_MOTION, menu_motion); SUBMENU(MSG_MOTION, menu_motion);
} }

View File

@ -226,7 +226,7 @@ void menu_temperature() {
#if PREHEAT_COUNT #if PREHEAT_COUNT
// //
// Preheat for Materials 1 to 5 // Preheat for all Materials
// //
LOOP_L_N(m, PREHEAT_COUNT) { LOOP_L_N(m, PREHEAT_COUNT) {
editable.int8 = m; editable.int8 = m;
@ -249,4 +249,24 @@ void menu_temperature() {
END_MENU(); END_MENU();
} }
#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM)
void menu_preheat_only() {
START_MENU();
BACK_ITEM(MSG_MAIN);
LOOP_L_N(m, PREHEAT_COUNT) {
editable.int8 = m;
#if HOTENDS > 1 || HAS_HEATED_BED
SUBMENU_S(ui.get_preheat_label(m), MSG_PREHEAT_M, menu_preheat_m);
#else
ACTION_ITEM_S(ui.get_preheat_label(m), MSG_PREHEAT_M, do_preheat_end_m);
#endif
}
END_MENU();
}
#endif
#endif // HAS_LCD_MENU && HAS_TEMPERATURE #endif // HAS_LCD_MENU && HAS_TEMPERATURE