Update 2.7 inch display

This commit is contained in:
jayofelony
2024-03-04 12:55:12 +01:00
parent aa2b09fb21
commit 913b1a6e1d

View File

@ -35,13 +35,11 @@ class Waveshare27inchV2(DisplayImpl):
from pwnagotchi.ui.hw.libs.waveshare.v2in7_v2.epd2in7_V2 import EPD from pwnagotchi.ui.hw.libs.waveshare.v2in7_v2.epd2in7_V2 import EPD
self._display = EPD() self._display = EPD()
self._display.init() self._display.init()
# this must have changed by waveshare
# remove the 0xFF(Clear(0xFF)) other wise it errors. can't pass oxff and self
self._display.Clear() self._display.Clear()
def render(self, canvas): def render(self, canvas):
buf = self._display.getbuffer(canvas) buf = self._display.getbuffer(canvas)
self._display.display_Partial(buf, 0, 0, 176, 264) self._display.display_Fast(buf)
def clear(self): def clear(self):
# This line also removes the 0xFF # This line also removes the 0xFF