-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOGM Display Screen Sleep #23927
DOGM Display Screen Sleep #23927
Conversation
Add Screen Timeout Feature for DOGM displays.
Adding #define HAS_SCREEN_TIMEOUT 1
Add to list: LSTR MSG_SCREEN_TIMEOUT = _UxGT("ScreenTimeout(m)");
Add settings for SCREEN_TIMEOUT feature.
Add declarations for SCREEN_TIMEOUT feature.
Add SCREEN_TIMEOUT feature
Add menu EDIT_ITEM: SCREEN_TIMEOUT
Add ui.sleep_on() and ui.sleep_off() for SCREEN_TIMEOUT feature.
This would be good, but I think it should be extra clear in the config/header that this won't work on the most common 12864 displays (RepRapDiscount Full Graphic Smart Controller & Mini 12864 LCDs) because I can already see the support requests coming in asking why it doesn't work. Adding some sanity checks to limit use would probably also help prevent hopeful LCD configs. |
Thanks for the good comments Keith, I don't know all the displays supported by Marlin, or the number of sales with each, but can, like you suggested, add some sanity checks in the This PR's code does rely on or interfere with any code related to the TOUCH_IDLE_SLEEP or LCD_BACKLIGHT_TIMEOUT features currently in bugfix-2.0.x, and those are available to anyone with those type of displays needing those features. I did place the |
I think adding sanity check would be sufficient if filtering those display with driver type
should be defined or enabled I think these will cover most of use case isn't it? |
Fixed typo on multi line comments, missing closing "*/" characters.
Merge with FR MarlinFirmware#23896 Sanity Checks for Screen Support Feature, Changes adds checks for unsupported displays.
#error "SCREEN_TIMEOUT feature not supported by Reprap Discount Full Graphics Smart Controller using ST7920" | ||
#elif ENABLED(CARTESIO_UI) | ||
#error "SCREEN_TIMEOUT feature not supported by CARTESIO_UI LCD" | ||
#elif IS_U8GLIB_LM6059_AF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CARTESIO_UI, IS_U8GLIB_LM6059_AF, IS_U8GLIB_ST7565_64128 devices support sleep
https://github.com/MarlinFirmware/U8glib-HAL/blob/master/src/clib/u8g_dev_st7565_dogm128.c#L171-L176
https://github.com/MarlinFirmware/U8glib-HAL/blob/master/src/clib/u8g_dev_st7565_lm6059.c#L144-L149
https://github.com/MarlinFirmware/U8glib-HAL/blob/master/src/clib/u8g_dev_st7565_64128n.c#L185-L190
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I add these displays to the updates at borland1#1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is ok to add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, If you don't mind, could you merge u8glib-hal for supporting additional devices?
I PR to add some display sleep support for u8glib-hal which is backported from u8g2 |
For some reason I'm unable to add commits directly to this PR so please merge borland1#1 to apply my updates. |
In Screen Timeout section, delete sanity checks for 'HAS_MARLINUI_HD44780' and 'CARTESIO_UI'. Reason: Screen Timeout feature is for DOGM displays, but HD44780 is not DOGM, while CARTESIO_UI displays are supported by Screen Timeout feature. Merge changes with PR MarlinFirmware#23927
In Display Sleep sanity checks, removed check for 'HAS_MARLINUI_HD44780 which is not DOGM. Also removed check for CARTESIO_UI which is supported by sleep/wake function. Merge with PR MarlinFirmware#23927
All you need to do to merge my PR into this PR is to press the "Merge" button on the page borland1#1. |
Sorry for the untimely response, but I have not had time to do the merge because there are some problems with the changes you are proposing. Right now, I don't have spare time to work on a solution that implements a compromise. Some of your changes appear either out of scope, not well thought out, or are trivial. I should have something worked up to merge in three or four days. |
I've reviewed the changes in my cleanup and extension PR, and I consider them all pretty much mandatory. I would prefer that you merge my PR and then afterward apply your adjustments. |
Description
Adds Screen Sleep feature for U8g DOGM displays which supports Sleep and Wake functions.
Configuration.h
file is, by default, commented out (disabled).Requirements
U8g DOGM supported displays.
Benefits
Helps reduce energy consumption during printing. Reduces pixel burn-in with OLED displays.
Configurations
Configuration.h
file has been modified and is included with this PR.Related Issues
None found.