mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 06:33:59 -06:00
display: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
cc2a313c10
commit
68b939c756
6 changed files with 279 additions and 279 deletions
|
@ -10,7 +10,7 @@ from . import font8x14
|
|||
|
||||
BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000
|
||||
|
||||
TextGlyphs = { 'right_arrow': '\x1a', 'degrees': '\xf8' }
|
||||
TextGlyphs = { 'right_arrow': b'\x1a', 'degrees': b'\xf8' }
|
||||
|
||||
class DisplayBase:
|
||||
def __init__(self, io, columns=128, x_offset=0):
|
||||
|
@ -19,7 +19,7 @@ class DisplayBase:
|
|||
self.columns = columns
|
||||
self.x_offset = x_offset
|
||||
self.vram = [bytearray(self.columns) for i in range(8)]
|
||||
self.all_framebuffers = [(self.vram[i], bytearray('~'*self.columns), i)
|
||||
self.all_framebuffers = [(self.vram[i], bytearray(b'~'*self.columns), i)
|
||||
for i in range(8)]
|
||||
# Cache fonts and icons in display byte order
|
||||
self.font = [self._swizzle_bits(bytearray(c))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue