mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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)
|
Reference in New Issue
Block a user