Hey — there’s a byte-order/alpha bug in tinyturing/display.py.
Pixels are stored as 0xRRGGBB00, so .tobytes() sends 00 B G R on little-endian machines. Rev C full frames expect opaque BGRA: B G R FF. Partial updates are fine because they explicitly send BGR.
On a 5" Red v2 this made white yellow and pure red/green/blue black. Confirmed with an eight-color test grid.
This fixes both full-refresh paths:
-framebuffer = self.framebuffer.transpose().tobytes()
+framebuffer = ((self.framebuffer.transpose() >> 8) | np.uint32(0xff000000)).tobytes()
Hey — there’s a byte-order/alpha bug in
tinyturing/display.py.Pixels are stored as
0xRRGGBB00, so.tobytes()sends00 B G Ron little-endian machines. Rev C full frames expect opaque BGRA:B G R FF. Partial updates are fine because they explicitly send BGR.On a 5" Red v2 this made white yellow and pure red/green/blue black. Confirmed with an eight-color test grid.
This fixes both full-refresh paths: