♻️ Display sleep minutes, encoder disable option (#24618)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -547,10 +547,10 @@ void menu_configuration() {
|
||||
//
|
||||
// Set display backlight / sleep timeout
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT && LCD_BKL_TIMEOUT_MIN < LCD_BKL_TIMEOUT_MAX
|
||||
EDIT_ITEM(uint16_4, MSG_LCD_TIMEOUT_SEC, &ui.lcd_backlight_timeout, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX, ui.refresh_backlight_timeout);
|
||||
#if LCD_BACKLIGHT_TIMEOUT_MINS
|
||||
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.backlight_timeout_minutes, ui.backlight_timeout_min, ui.backlight_timeout_max, ui.refresh_backlight_timeout);
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.sleep_timeout_minutes, SLEEP_TIMEOUT_MIN, SLEEP_TIMEOUT_MAX, ui.refresh_screen_timeout);
|
||||
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.sleep_timeout_minutes, ui.sleep_timeout_min, ui.sleep_timeout_max, ui.refresh_screen_timeout);
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
|
||||
@@ -402,8 +402,13 @@ class MenuItem_bool : public MenuEditItemBase {
|
||||
|
||||
// Predefined menu item types //
|
||||
|
||||
#define BACK_ITEM_F(FLABEL) MENU_ITEM_F(back, FLABEL)
|
||||
#define BACK_ITEM(LABEL) MENU_ITEM(back, LABEL)
|
||||
#if HAS_BACK_ITEM
|
||||
#define BACK_ITEM_F(FLABEL) MENU_ITEM_F(back, FLABEL)
|
||||
#define BACK_ITEM(LABEL) MENU_ITEM(back, LABEL)
|
||||
#else
|
||||
#define BACK_ITEM_F(FLABEL) NOOP
|
||||
#define BACK_ITEM(LABEL) NOOP
|
||||
#endif
|
||||
|
||||
#define ACTION_ITEM_N_S_F(N, S, FLABEL, ACTION) MENU_ITEM_N_S_F(function, N, S, FLABEL, ACTION)
|
||||
#define ACTION_ITEM_N_S(N, S, LABEL, ACTION) ACTION_ITEM_N_S_F(N, S, GET_TEXT_F(LABEL), ACTION)
|
||||
|
||||
@@ -325,6 +325,17 @@ void menu_main() {
|
||||
SUBMENU(MSG_TEMPERATURE, menu_temperature);
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
||||
YESNO_ITEM(MSG_FILAMENTCHANGE,
|
||||
menu_change_filament, nullptr,
|
||||
GET_TEXT_F(MSG_FILAMENTCHANGE), (const char *)nullptr, F("?")
|
||||
);
|
||||
#else
|
||||
SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_POWER_MONITOR
|
||||
SUBMENU(MSG_POWER_MONITOR, menu_power_monitor);
|
||||
#endif
|
||||
@@ -349,17 +360,6 @@ void menu_main() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
||||
YESNO_ITEM(MSG_FILAMENTCHANGE,
|
||||
menu_change_filament, nullptr,
|
||||
GET_TEXT_F(MSG_FILAMENTCHANGE), (const char *)nullptr, F("?")
|
||||
);
|
||||
#else
|
||||
SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_INFO_MENU)
|
||||
SUBMENU(MSG_INFO_MENU, menu_info);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user