From 26c33f45d16c54c815422e5c1955cdf2c2a866b7 Mon Sep 17 00:00:00 2001 From: Teddy Tennant Date: Sun, 30 Aug 2026 11:43:24 -0400 Subject: [PATCH] send opaque BGRA on full frame updates --- tinyturing/tinyturing/display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyturing/tinyturing/display.py b/tinyturing/tinyturing/display.py index b58155af..db16aaa3 100644 --- a/tinyturing/tinyturing/display.py +++ b/tinyturing/tinyturing/display.py @@ -106,7 +106,7 @@ def flip(self, force=False): self.send_command(PRE_UPDATE_BITMAP) self.send_command(START_DISPLAY_BITMAP) self.send_command(DISPLAY_BITMAP) - framebuffer = self.framebuffer.transpose().tobytes() + framebuffer = ((self.framebuffer.transpose() >> 8) | np.uint32(0xff000000)).tobytes() self.send_command(bytearray([0xff]), b"\x00".join([framebuffer[i:i+249] for i in range(0, len(framebuffer), 249)])) logging.debug(f"{self.lcd.read(1024)[:0x20]}") self.send_command(QUERY_STATUS) @@ -125,7 +125,7 @@ def flip(self, force=False): self.send_command(PRE_UPDATE_BITMAP) self.send_command(START_DISPLAY_BITMAP) self.send_command(DISPLAY_BITMAP) - framebuffer = self.framebuffer.transpose().tobytes() + framebuffer = ((self.framebuffer.transpose() >> 8) | np.uint32(0xff000000)).tobytes() self.send_command(bytearray([0xff]), b"\x00".join([framebuffer[i:i+249] for i in range(0, len(framebuffer), 249)])) logging.debug(f"{self.lcd.read(1024)[:0x20]}") self.send_command(QUERY_STATUS)