Browse Source

Preheat Menu shortcut option (#20350)

vanilla_fb_2.0.x
Vi B-P 4 years ago
committed by Scott Lahteine
parent
commit
13dee4d059
  1. 3
      Marlin/Configuration_adv.h
  2. 4
      Marlin/src/inc/Conditionals_post.h
  3. 8
      Marlin/src/lcd/menu/menu_main.cpp
  4. 22
      Marlin/src/lcd/menu/menu_temperature.cpp

3
Marlin/Configuration_adv.h

@ -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

4
Marlin/src/inc/Conditionals_post.h

@ -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
*/ */

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

@ -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);
} }

22
Marlin/src/lcd/menu/menu_temperature.cpp

@ -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

Loading…
Cancel
Save