Skip to content

Commit

Permalink
Add support for SSD1608 variant 250x122 pixel Inky pHATs
Browse files Browse the repository at this point in the history
Running `python3 -m inky.eeprom` should show display variant. Variants 10, 11 and 12 are SSD1608 based.

This patch adds support for auto-detecting and using them when "ui.display.color" is set to "auto".

Fixes #980 and #941

Signed-off-by: Philip Howard <phil@gadgetoid.com>
  • Loading branch information
Gadgetoid committed Apr 9, 2021
1 parent 0704541 commit 34c2c8a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pwnagotchi/ui/hw/inky.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ def initialize(self):
from pwnagotchi.ui.hw.libs.inkyphat.inkyphatfast import InkyPHATFast
self._display = InkyPHATFast('black')
self._display.set_border(InkyPHATFast.BLACK)
elif self.config['color'] == 'auto':
from inky.auto import auto
self._display = auto()
self._display.set_border(self._display.BLACK)
self._layout['width'] = self._display.WIDTH
self._layout['height'] = self._display.HEIGHT
else:
from inky import InkyPHAT
self._display = InkyPHAT(self.config['color'])
Expand Down

0 comments on commit 34c2c8a

Please # to comment.