Change luma usage.

#672.
pull/678/head
cyoung 2017-10-17 14:42:19 -04:00
rodzic 0d4d61cf56
commit b7beee37f0
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -1,5 +1,6 @@
#!/usr/bin/env python
from luma.core.interface.serial import i2c
from luma.oled.device import ssd1306, sh1106
from luma.core.render import canvas
@ -20,7 +21,8 @@ class StratuxScreen():
self.pidfile_timeout = 5
def run(self):
font2 = ImageFont.truetype('/etc/stratux-screen/CnC_Red_Alert.ttf', 12)
oled = ssd1306(port=1, address=0x3C)
serial = i2c(port=1, address=0x3c)
oled = ssd1306(serial)
with canvas(oled) as draw:
logo = Image.open('/etc/stratux-screen/stratux-logo-64x64.bmp')