From 33d448b57c94ac5477a46e83719392256175e904 Mon Sep 17 00:00:00 2001 From: Andreas Hardtung Date: Thu, 7 Nov 2019 21:55:20 +0100 Subject: [PATCH] Update Display Throttling Times for drawing different screens vary a lot (8-180ms measured). To get 180\*2 ms into the planner-buffer is rare. For that measure only the duration of status-screens. Their drawing times are about constant. --- Marlin/src/lcd/ultralcd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index b4b1483e302b..faee6149e04d 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -1033,7 +1033,8 @@ void MarlinUI::update() { // If still drawing and there's another page, update max-time and return now. // The nextPage will already be set up on the next call. if (drawing_screen && (drawing_screen = u8g.nextPage())) { - NOLESS(max_display_update_time, millis() - ms); + if (on_status_screen()) + NOLESS(max_display_update_time, millis() - ms); return; } } @@ -1050,7 +1051,8 @@ void MarlinUI::update() { // Keeping track of the longest time for an individual LCD update. // Used to do screen throttling when the planner starts to fill up. - NOLESS(max_display_update_time, millis() - ms); + if (on_status_screen()) + NOLESS(max_display_update_time, millis() - ms); } #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS