Skip to content

Commit 779b921

Browse files
authored
Fix Display class on stretch. (#424)
See #423 for more details.
1 parent a00032c commit 779b921

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ev3dev/display.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ def update(self):
272272
Nothing will be drawn on the screen until this function is called.
273273
"""
274274
if self.var_info.bits_per_pixel == 1:
275-
self.mmap[:] = self._img.tobytes("raw", "1;IR")
275+
b = self._img.tobytes("raw", "1;R")
276+
self.mmap[:len(b)] = b
276277
elif self.var_info.bits_per_pixel == 16:
277278
self.mmap[:] = self._img_to_rgb565_bytes()
278279
else:

0 commit comments

Comments
 (0)