From 631ddb7663ea55b1459da05b69b8a133c179fd3f Mon Sep 17 00:00:00 2001 From: Matt Vogel Date: Sat, 8 Jan 2022 21:50:37 -0500 Subject: [PATCH] invert black buffer --- .../python/lib/waveshare_epd/epd7in5b_V2.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5b_V2.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5b_V2.py index 0e5c08f..df09ae3 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5b_V2.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5b_V2.py @@ -154,10 +154,13 @@ class EPD: def display(self, imageblack, imagered): self.send_command(0x10) - self.send_data2(~imageblack) - + # The black bytes need to be inverted back from what getbuffer did + for i in range(len(imageblack)): + imageblack[i] ^= 0xFF + self.send_data2(imageblack) + self.send_command(0x13) - self.send_data2(imagered) #this may need to be ~ inverted + self.send_data2(imagered) self.send_command(0x12) epdconfig.delay_ms(100)