From b86c98fe5e5e0e7d3db5412364e6ec3205d72736 Mon Sep 17 00:00:00 2001 From: dr-boehmerie Date: Sun, 22 Aug 2021 19:59:53 +0200 Subject: [PATCH 1/4] Fix WaveshareTriColorDisplay Use driver name instead of device name in super().__init__() --- src/omni_epd/displays/waveshare_display.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/omni_epd/displays/waveshare_display.py b/src/omni_epd/displays/waveshare_display.py index d3fc18c..386b797 100644 --- a/src/omni_epd/displays/waveshare_display.py +++ b/src/omni_epd/displays/waveshare_display.py @@ -171,7 +171,8 @@ class WaveshareTriColorDisplay(WaveshareDisplay): "epd7in5b_HD": {"driver": "epd7in5b_HD", "modes": ("bw", "red")}} def __init__(self, deviceName, config): - super().__init__(deviceName, config) + driverName = self.deviceMap[deviceName]['driver'] + super().__init__(driverName, config) # device object loaded in parent class From b4ce6b0fbd371aef3fe72f19c8beb6896e878314 Mon Sep 17 00:00:00 2001 From: dr-boehmerie Date: Sun, 22 Aug 2021 22:29:46 +0200 Subject: [PATCH 2/4] Fix overlay colors for epd5in83c In mode bw, color data should be filled with 255. Overlay texts use entries at the end of the palette, and should be converted to 255 as well. --- src/omni_epd/displays/waveshare_display.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/omni_epd/displays/waveshare_display.py b/src/omni_epd/displays/waveshare_display.py index 386b797..e2d6dad 100644 --- a/src/omni_epd/displays/waveshare_display.py +++ b/src/omni_epd/displays/waveshare_display.py @@ -201,17 +201,17 @@ def _display(self, image): if(self.mode == 'bw'): # send the black/white image and blank second image (safer since some drivers require data) - self._device.display(self._device.getbuffer(image), [0x00] * (int(self.width/8) * self.height)) + self._device.display(self._device.getbuffer(image), [255] * (int(self.width/8) * self.height)) else: # apply the color filter to get a 3 color image image = self._filterImage(image) # separate out black from the other color img_black = image.copy() - img_black.putpalette((255, 255, 255, 0, 0, 0, 255, 255, 255) + (0, 0, 0)*253) + img_black.putpalette((255, 255, 255, 0, 0, 0, 255, 255, 255) + (255, 255, 255)*253) img_color = image.copy() - img_color.putpalette((255, 255, 255, 255, 255, 255, 0, 0, 0) + (0, 0, 0)*253) + img_color.putpalette((255, 255, 255, 255, 255, 255, 0, 0, 0) + (255, 255, 255)*253) self._device.display(self._device.getbuffer(img_black), self._device.getbuffer(img_color)) From e55b24056460c16bf64e1aa56935dcf1d0177b16 Mon Sep 17 00:00:00 2001 From: dr-boehmerie Date: Mon, 23 Aug 2021 19:45:57 +0200 Subject: [PATCH 3/4] Mark waveshare_epd.epd5in83c as verified --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9759ff2..6bcdc5a 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ Below is a list of displays currently implemented in the library. The Omni Devic | | [5.65inch e-Paper Module F](https://www.waveshare.com/5.65inch-e-Paper-Module-F.htm) |waveshare_epd.epd5in65f | bw, color | | | [5.83inch e-Paper HAT](https://www.waveshare.com/5.83inch-e-Paper-HAT.htm) |waveshare_epd.epd5in83
waveshare_epd.epd5in83_V2 | bw | | | [5.83inch e-Paper HAT B](https://www.waveshare.com/5.83inch-e-Paper-HAT-B.htm) |waveshare_epd.epd5in83b
waveshare_epd.epd5in83b_V2 | bw, red | -| | [5.83inch e-Paper HAT C](https://www.waveshare.com/5.83inch-e-Paper-HAT-C.htm) |waveshare_epd.epd5in83c | bw, yellow | +| | [5.83inch e-Paper HAT C](https://www.waveshare.com/5.83inch-e-Paper-HAT-C.htm) | __waveshare_epd.epd5in83c__ | bw, yellow | | | [7.5inch e-Paper HAT](https://www.waveshare.com/7.5inch-e-Paper-HAT.htm) |waveshare_epd.epd7in5
__waveshare_epd.epd7in5_V2__ | bw | | | [7.5inch HD e-Paper HAT](https://www.waveshare.com/7.5inch-HD-e-Paper-HAT.htm) |waveshare_epd.epd7in5_HD | bw | | | [7.5inch HD e-Paper HAT B](https://www.waveshare.com/7.5inch-HD-e-Paper-HAT-B.htm) |waveshare_epd.epd7in5b_HD | bw, red | From 70bf0afd2e84ad9c4ea542521ce6eb994713a2b5 Mon Sep 17 00:00:00 2001 From: dr-boehmerie Date: Tue, 24 Aug 2021 19:52:44 +0200 Subject: [PATCH 4/4] Mark epd2in7 and epd2in9 as verified --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6bcdc5a..b5ecc05 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,9 @@ Below is a list of displays currently implemented in the library. The Omni Devic | | [2.13inch e-Paper HAT D](https://www.waveshare.com/2.13inch-e-Paper-HAT-D.htm) | waveshare_epd.epd2in13d | bw | | | [2.66inch e-Paper Module](https://www.waveshare.com/2.66inch-e-Paper-Module.htm) | waveshare_epd.epd2in66 | bw | | | [2.66inch e-Paper Module B](https://www.waveshare.com/2.66inch-e-Paper-Module-B.htm) | waveshare_epd.epd2in66b | bw, red | -| | [2.7inch e-Paper HAT](https://www.waveshare.com/2.7inch-e-Paper-HAT.htm) | waveshare_epd.epd2in7 | bw | +| | [2.7inch e-Paper HAT](https://www.waveshare.com/2.7inch-e-Paper-HAT.htm) | __waveshare_epd.epd2in7__ | bw | | | [2.7inch e-Paper HAT B](https://www.waveshare.com/2.7inch-e-Paper-HAT-B.htm) | waveshare_epd.epd2in7b
waveshare_epd.epd2in7b_V2 | bw, red | -| | [2.9inch e-Paper Module](https://www.waveshare.com/2.9inch-e-Paper-Module.htm) | waveshare_epd.epd2in9
waveshare_epd.epd2in9_V2 | bw, red | +| | [2.9inch e-Paper Module](https://www.waveshare.com/2.9inch-e-Paper-Module.htm) | __waveshare_epd.epd2in9__
waveshare_epd.epd2in9_V2 | bw | | | [2.9inch e-Paper Module B](https://www.waveshare.com/2.9inch-e-Paper-Module-B.htm) | waveshare_epd.epd2in9b
waveshare_epd.epd2in9b_V3 | bw, red | | | [2.9inch e-Paper Module C](https://www.waveshare.com/2.9inch-e-Paper-Module-C.htm) | waveshare_epd.epd2in9c | bw, yellow | | | [2.9inch e-Paper HAT D](https://www.waveshare.com/2.9inch-e-Paper-HAT-D.htm) | waveshare_epd.epd2in9d | bw |