DOGM Display Sleep (#23992)

Co-authored-by: borland1 <barryorlando@hotmail.com>
This commit is contained in:
Scott Lahteine
2022-04-04 15:57:03 -05:00
committed by Scott Lahteine
parent 4ae54a6229
commit dbd00d9927
13 changed files with 141 additions and 2 deletions

View File

@ -628,6 +628,12 @@
#if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, SDSUPPORT)
#define HAS_LEDS_OFF_FLAG 1
#endif
#ifdef DISPLAY_SLEEP_MINUTES
#define HAS_DISPLAY_SLEEP 1
#endif
#if HAS_DISPLAY_SLEEP || LCD_BACKLIGHT_TIMEOUT
#define HAS_GCODE_M255 1
#endif
#if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#define HAS_MOTOR_CURRENT_I2C 1

View File

@ -2885,6 +2885,17 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
#endif
/**
* Display Sleep is not supported by these common displays
*/
#if HAS_DISPLAY_SLEEP
#if ANY(IS_U8GLIB_LM6059_AF, IS_U8GLIB_ST7565_64128, REPRAPWORLD_GRAPHICAL_LCD, FYSETC_MINI, ENDER2_STOCKDISPLAY, MINIPANEL)
#error "DISPLAY_SLEEP_MINUTES is not supported by your display."
#elif !WITHIN(DISPLAY_SLEEP_MINUTES, 0, 255)
#error "DISPLAY_SLEEP_MINUTES must be between 0 and 255."
#endif
#endif
/**
* Some boards forbid the use of -1 Native USB
*/