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.
This commit is contained in:
Ace 2019-03-22 17:00:17 +01:00 committed by GitHub
parent 6490f8e89e
commit fa113b101e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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