⚡️Reduce DISPLAY_SLEEP_MINUTES overhead (#26964)
This commit is contained in:
@@ -377,7 +377,13 @@ void MarlinUI::draw_kill_screen() {
|
|||||||
void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||||
|
|
||||||
#if HAS_DISPLAY_SLEEP
|
#if HAS_DISPLAY_SLEEP
|
||||||
void MarlinUI::sleep_display(const bool sleep/*=true*/) { sleep ? u8g.sleepOn() : u8g.sleepOff(); }
|
void MarlinUI::sleep_display(const bool sleep/*=true*/) {
|
||||||
|
static bool asleep = false;
|
||||||
|
if (asleep != sleep){
|
||||||
|
sleep ? u8g.sleepOn() : u8g.sleepOff();
|
||||||
|
asleep = sleep;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_LCD_BRIGHTNESS
|
#if HAS_LCD_BRIGHTNESS
|
||||||
|
Reference in New Issue
Block a user