Skip to content

Commit

Permalink
fix for 0.66" 64x48 OLED
Browse files Browse the repository at this point in the history
  • Loading branch information
asmagill committed Jan 4, 2024
1 parent 267219f commit bf61c20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion adafruit_displayio_ssd1306.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,15 @@ def __init__(
col_offset = (
0 if width == 128 else (128 - width) // 2
) # https://github.com/micropython/micropython/pull/7411
row_offset = (
col_offset if (kwargs["height"] != 48 or kwargs["width"] != 64) else 0
) # fix for 0.66" 64x48 OLED
super().__init__(
bus,
init_sequence,
**kwargs,
colstart=col_offset,
rowstart=col_offset,
rowstart=row_offset,
color_depth=1,
grayscale=True,
pixels_in_byte_share_row=False,
Expand Down

0 comments on commit bf61c20

Please sign in to comment.