From 4910e57dd8fc5eebf67f1847f56f2ef1875dd1cf Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sun, 22 Sep 2019 16:23:36 +0300 Subject: [PATCH] fix for displays with width > 256 --- adafruit_ssd1608.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_ssd1608.py b/adafruit_ssd1608.py index 040f9ac..52b228c 100644 --- a/adafruit_ssd1608.py +++ b/adafruit_ssd1608.py @@ -69,7 +69,7 @@ class SSD1608(displayio.EPaperDisplay): def __init__(self, bus, **kwargs): start_sequence = bytearray(_START_SEQUENCE) width = kwargs["width"] - start_sequence[4] = width - 1 + start_sequence[4] = (width - 1) & 0xff start_sequence[5] = (width - 1) >> 8 super().__init__(bus, start_sequence, _STOP_SEQUENCE, **kwargs,