From c656ee9ffd6ec322440f3e1130aa16a1f5056a6a Mon Sep 17 00:00:00 2001 From: Crazypedia Date: Thu, 27 Aug 2026 11:03:34 -0400 Subject: [PATCH] fix(gdeq031t10): skip the panel refresh when the frame is unchanged (#624) --- Drivers/gdeq031t10-module/source/gdeq031t10.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Drivers/gdeq031t10-module/source/gdeq031t10.cpp b/Drivers/gdeq031t10-module/source/gdeq031t10.cpp index 1ed82caf..3fd5309d 100644 --- a/Drivers/gdeq031t10-module/source/gdeq031t10.cpp +++ b/Drivers/gdeq031t10-module/source/gdeq031t10.cpp @@ -387,9 +387,6 @@ static error_t gdeq031t10_draw_bitmap(Device* device, int32_t x_start, int32_t y xSemaphoreTake(internal->panel_mutex, portMAX_DELAY); - // Work-around until partial updates are working - internal->force_full_refresh = true; - if (!internal->display_on) { // Display is off (deep sleep). Drop the frame without touching the shadow: the // mismatch it leaves behind makes the frame redraw after the next power-on. @@ -419,6 +416,11 @@ static error_t gdeq031t10_draw_bitmap(Device* device, int32_t x_start, int32_t y return ERROR_NONE; // panel already shows this frame; don't refresh needlessly } + // Work-around until partial updates are working. It has to stay below the unchanged-frame + // check: a repaint that renders identical pixels must cost nothing, or a periodically + // repainting app pins the panel in a ~1.2s full-refresh loop. + internal->force_full_refresh = true; + if (internal->force_full_refresh) { LOG_I(TAG, "draw_bitmap: refresh_full"); refresh_full(internal, config->mirror_180, config->refresh_mode, render_bitmap);