Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-11-29 16:00:06 +01:00
parent 45273f6883
commit ee9aaac711
8 changed files with 11 additions and 14 deletions

View File

@ -56,7 +56,7 @@ def display_for(config):
return Waveshare27inch(config)
elif config['ui']['display']['type'] == 'waveshare27inchv2':
return Waveshare27inchv2(config)
return Waveshare27inchV2(config)
elif config['ui']['display']['type'] == 'waveshare29inch':
return Waveshare29inch(config)

View File

@ -32,11 +32,12 @@ import logging
from . import epdconfig
# Display resolution
EPD_WIDTH = 122
EPD_HEIGHT = 250
EPD_WIDTH = 122
EPD_HEIGHT = 250
logger = logging.getLogger(__name__)
class EPD:
def __init__(self):
self.reset_pin = epdconfig.RST_PIN

View File

@ -4,6 +4,7 @@ import pwnagotchi.ui.fonts as fonts
from pwnagotchi.ui.hw.base import DisplayImpl
from PIL import Image
class Waveshare213bV4(DisplayImpl):
def __init__(self, config):
super(Waveshare213bV4, self).__init__(config, 'waveshare213inb_v4')
@ -68,4 +69,4 @@ class Waveshare213bV4(DisplayImpl):
self._display.display(buffer(imageBlack), buffer(imageRed))
def clear(self):
self._display.Clear()
self._display.Clear()

View File

@ -2,7 +2,7 @@ import logging
import pwnagotchi.ui.fonts as fonts
from pwnagotchi.ui.hw.base import DisplayImpl
from PIL import Image
class WaveshareV4(DisplayImpl):
def __init__(self, config):
@ -31,8 +31,6 @@ class WaveshareV4(DisplayImpl):
}
return self._layout
def initialize(self):
logging.info("initializing waveshare v4 display")
from pwnagotchi.ui.hw.libs.waveshare.v4.epd2in13_V4 import EPD
@ -40,11 +38,9 @@ class WaveshareV4(DisplayImpl):
self._display.init()
self._display.Clear(0xFF)
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.displayPartial(buf)
def clear(self):
self._display.Clear(0xFF)