diff --git a/library/lcd/lcd_comm_rev_c.py b/library/lcd/lcd_comm_rev_c.py index f2ef3789..91aeb7f3 100644 --- a/library/lcd/lcd_comm_rev_c.py +++ b/library/lcd/lcd_comm_rev_c.py @@ -339,7 +339,7 @@ def DisplayPILImage( display_bmp_cmd = Command.DISPLAY_BITMAP_8INCH self._send_command(display_bmp_cmd, - payload=bytearray(int(self.display_width * self.display_width / 64).to_bytes(2))) + payload=bytearray(int(self.display_width * self.display_width / 64).to_bytes(2, "big"))) self._send_command(Command.SEND_PAYLOAD, payload=bytearray(self._generate_full_image(image)), readsize=1024) diff --git a/library/lcd/lcd_comm_rev_d.py b/library/lcd/lcd_comm_rev_d.py index d7fda68b..a47b7f0e 100644 --- a/library/lcd/lcd_comm_rev_d.py +++ b/library/lcd/lcd_comm_rev_d.py @@ -89,7 +89,7 @@ def Reset(self): def Clear(self): # HW revision D does not implement a Clear command: display a blank image on the whole screen color = 0xFFFF # RGB565 White color - color_bytes = bytearray(color.to_bytes(2)) + color_bytes = bytearray(color.to_bytes(2, "big")) self.SendCommand(cmd=Command.DISPCOLOR, payload=color_bytes) def ScreenOff(self):