✨ DOGM Display Sleep (#23992)
Co-authored-by: borland1 <barryorlando@hotmail.com>
This commit is contained in:
committed by
Scott Lahteine
parent
4ae54a6229
commit
dbd00d9927
@ -402,7 +402,9 @@ typedef struct SettingsDataStruct {
|
||||
// Display Sleep
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
uint16_t lcd_backlight_timeout; // (G-code needed)
|
||||
uint16_t lcd_backlight_timeout; // M255 S
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
uint8_t sleep_timeout_minutes; // M255 S
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -631,6 +633,8 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
ui.refresh_backlight_timeout();
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
ui.refresh_screen_timeout();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1146,6 +1150,8 @@ void MarlinSettings::postprocess() {
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
EEPROM_WRITE(ui.lcd_backlight_timeout);
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
EEPROM_WRITE(ui.sleep_timeout_minutes);
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -2077,6 +2083,8 @@ void MarlinSettings::postprocess() {
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
EEPROM_READ(ui.lcd_backlight_timeout);
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
EEPROM_READ(ui.sleep_timeout_minutes);
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -3128,6 +3136,8 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
ui.lcd_backlight_timeout = LCD_BACKLIGHT_TIMEOUT;
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
ui.sleep_timeout_minutes = DISPLAY_SLEEP_MINUTES;
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -3464,6 +3474,11 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
TERN_(HAS_LCD_CONTRAST, gcode.M250_report(forReplay));
|
||||
|
||||
//
|
||||
// Display Sleep
|
||||
//
|
||||
TERN_(HAS_GCODE_M255, gcode.M255_report(forReplay));
|
||||
|
||||
//
|
||||
// LCD Brightness
|
||||
//
|
||||
|
Reference in New Issue
Block a user