From 5807cfdb964bad3a278dcdbaacfaef8d1f5044b8 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 7 Oct 2024 18:25:08 +0200 Subject: [PATCH] Fixed display sleep on T3S3 --- Display.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Display.h b/Display.h index 38f8e6d..7112b2c 100644 --- a/Display.h +++ b/Display.h @@ -692,18 +692,22 @@ void update_disp_area() { } void update_display(bool blank = false) { - if (display_blanking_enabled && millis()-last_unblank_event >= display_blanking_timeout) { - blank = true; - display_blanked = true; - if (display_intensity != 0) { - display_unblank_intensity = display_intensity; - } - display_intensity = 0; + if (blank == true) { + last_disp_update = millis()-disp_update_interval-1; } else { - display_blanked = false; - if (display_unblank_intensity != 0x00) { - display_intensity = display_unblank_intensity; - display_unblank_intensity = 0x00; + if (display_blanking_enabled && millis()-last_unblank_event >= display_blanking_timeout) { + blank = true; + display_blanked = true; + if (display_intensity != 0) { + display_unblank_intensity = display_intensity; + } + display_intensity = 0; + } else { + display_blanked = false; + if (display_unblank_intensity != 0x00) { + display_intensity = display_unblank_intensity; + display_unblank_intensity = 0x00; + } } }