Skip to content

Commit 01e8c6f

Browse files
author
Melissa LeBlanc-Williams
committed
Fixed BMP Drawing Example
1 parent f6026ec commit 01e8c6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adafruit_ra8875/ra8875.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ def set_window(self, x, y, width, height):
410410
self.write_reg(reg.VEAW0 + 1, (y + height) >> 8)
411411
#pylint: enable-msg=invalid-name,too-many-arguments
412412

413+
@staticmethod
414+
def _encode_pixel(color):
415+
"""Encode a pixel that is compatible with this display"""
416+
return struct.pack(">H", color)
417+
413418
class RA8875(RA8875Display):
414419
"""Set Initial Variables"""
415420
#pylint: disable-msg=invalid-name,too-many-arguments

0 commit comments

Comments
 (0)