Skip to content

Commit 11673c6

Browse files
authored
Fix Screen class on stretch. (#425)
See #423 for more details.
1 parent 02fa602 commit 11673c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ev3dev/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3317,7 +3317,8 @@ def update(self):
33173317
Nothing will be drawn on the screen until this function is called.
33183318
"""
33193319
if self.var_info.bits_per_pixel == 1:
3320-
self.mmap[:] = self._img.tobytes("raw", "1;IR")
3320+
b = self._img.tobytes("raw", "1;R")
3321+
self.mmap[:len(b)] = b
33213322
elif self.var_info.bits_per_pixel == 16:
33223323
self.mmap[:] = self._img_to_rgb565_bytes()
33233324
else:

0 commit comments

Comments
 (0)