Skip to content

Commit aa97924

Browse files
committed
Update SET_COM_PIN_CFG setting logic
Based on micropython/micropython@8680a74
1 parent e52698d commit aa97924

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

adafruit_ssd1306.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ def init_display(self):
112112
SET_DISP_OFFSET,
113113
0x00,
114114
SET_COM_PIN_CFG,
115-
0x02
116-
if (self.height == 32 or self.height == 16) and (self.width != 64)
117-
else 0x12,
115+
0x02 if self.width > 2 * self.height else 0x12,
118116
# timing and driving scheme
119117
SET_DISP_CLK_DIV,
120118
0x80,

0 commit comments

Comments
 (0)