diff options
author | robert-hh <robert@hammelrath.com> | 2020-03-29 10:58:08 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-07 13:42:37 +1000 |
commit | 8680a745956ad948d83fe845931f75c814a23c70 (patch) | |
tree | 49ca3ad22612e244f8447bcf3ff01785348d361b | |
parent | 073b9a5eb888b26be7ce4c65e9649b6c3857ba39 (diff) |
drivers/display/ssd1306.py: Change the SET_COM_PIN_CFG setting.
Making it more specific to use 0x02 for display with an aspect ratio > 2
(resolutions 96x16 and 128x32) and 0x12 for all other sizes as recommended
by @mcauser. Tested with a 64x32 display which did not work before.
-rw-r--r-- | drivers/display/ssd1306.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/display/ssd1306.py b/drivers/display/ssd1306.py index 4893b2045..6359c85ea 100644 --- a/drivers/display/ssd1306.py +++ b/drivers/display/ssd1306.py @@ -50,7 +50,7 @@ class SSD1306(framebuf.FrameBuffer): SET_DISP_OFFSET, 0x00, SET_COM_PIN_CFG, - 0x02 if self.height == 32 else 0x12, + 0x02 if self.width > 2 * self.height else 0x12, # timing and driving scheme SET_DISP_CLK_DIV, 0x80, |