Skip to content

Commit bf61c20

Browse files
committed
fix for 0.66" 64x48 OLED
1 parent 267219f commit bf61c20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_displayio_ssd1306.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,15 @@ def __init__(
8787
col_offset = (
8888
0 if width == 128 else (128 - width) // 2
8989
) # https://github.com/micropython/micropython/pull/7411
90+
row_offset = (
91+
col_offset if (kwargs["height"] != 48 or kwargs["width"] != 64) else 0
92+
) # fix for 0.66" 64x48 OLED
9093
super().__init__(
9194
bus,
9295
init_sequence,
9396
**kwargs,
9497
colstart=col_offset,
95-
rowstart=col_offset,
98+
rowstart=row_offset,
9699
color_depth=1,
97100
grayscale=True,
98101
pixels_in_byte_share_row=False,

0 commit comments

Comments
 (0)