diff --git a/pythonNanoGui/drivers/ePaper2in13V4.py b/pythonNanoGui/drivers/ePaper2in13V4.py index 9cfbb6d..0c3b985 100644 --- a/pythonNanoGui/drivers/ePaper2in13V4.py +++ b/pythonNanoGui/drivers/ePaper2in13V4.py @@ -17,6 +17,7 @@ import framebuf import uasyncio as asyncio from time import sleep_ms, ticks_ms, ticks_us, ticks_diff +from drivers.boolpalette import BoolPalette class EPD(framebuf.FrameBuffer): # A monochrome approach should be used for coding this. The rgb method ensures @@ -43,6 +44,7 @@ def __init__(self, spi, cs, dc, rst, busy, landscape=False, asyn=False, full=Tru self._buffer = bytearray(self.height * self.width // 8) self._mvb = memoryview(self._buffer) mode = framebuf.MONO_VLSB if landscape else framebuf.MONO_HLSB + self.palette = BoolPalette(mode) # Enable CWriter. super().__init__(self._buffer, self.width, self.height, mode) if self._full: self.init()