uc1701: Fix for glyph rendering on uc1701 display (#2966)

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
This commit is contained in:
Florian Heilmann 2020-06-09 14:20:48 +02:00 committed by GitHub
parent cf9627cc05
commit f28c3319ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ class DisplayBase:
bits_bot = [0] * 8 bits_bot = [0] * 8
for row in range(8): for row in range(8):
for col in range(8): for col in range(8):
bits_top[col] |= ((data[row] >> (8 - col)) & 1) << row bits_top[col] |= ((data[row] >> (7 - col)) & 1) << row
bits_bot[col] |= ((data[row + 8] >> (8 - col)) & 1) << row bits_bot[col] |= ((data[row + 8] >> (7 - col)) & 1) << row
return (bits_top, bits_bot) return (bits_top, bits_bot)
def write_text(self, x, y, data): def write_text(self, x, y, data):
if x + len(data) > 16: if x + len(data) > 16: