From fa113b101e14890890ce08fee8f529f4019d5f24 Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 22 Mar 2019 17:00:17 +0100 Subject: [PATCH] Fixed a problem for 3-Colour Displays While improving the readability of the code some commits ago, a problem occured where 3-coloured E-Paper-Displays had problems correctly rendering the image. With this fix, it should be solved now. --- Calendar/E-Paper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calendar/E-Paper.py b/Calendar/E-Paper.py index b4514e4..2b95c0e 100644 --- a/Calendar/E-Paper.py +++ b/Calendar/E-Paper.py @@ -391,7 +391,7 @@ def main(): if display_colours is "bwr": buffer[np.logical_and(r > 240, g > 240)] = [255,255,255] #white buffer[np.logical_and(r > 240, g < 240)] = [255,0,0] #red - buffer[np.logical_and(r != 255, r is g )] = [0,0,0] #black + buffer[np.logical_and(r != 255, r == g )] = [0,0,0] #black if display_colours is "bw": buffer[np.logical_and(r > 240, g > 240)] = [255,255,255] #white