diff --git a/README.rst b/README.rst index ac0cd51..ad26a4b 100644 --- a/README.rst +++ b/README.rst @@ -85,7 +85,12 @@ Usage Example f = open("/display-ruler.bmp", "rb") pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) + # CircuitPython 6 & 7 compatible + t = displayio.TileGrid( + pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) + ) + # CircuitPython 7 compatible only + # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) g.append(t) display.show(g) diff --git a/adafruit_il91874.py b/adafruit_il91874.py index 6aec9a0..72e1f71 100644 --- a/adafruit_il91874.py +++ b/adafruit_il91874.py @@ -20,11 +20,9 @@ **Software and Dependencies:** -* Adafruit CircuitPython firmware (version 5+) for the supported boards: +* Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases -# * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice -# * Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register """ import displayio diff --git a/examples/il91874_simpletest.py b/examples/il91874_simpletest.py index 39e8487..9d2a791 100644 --- a/examples/il91874_simpletest.py +++ b/examples/il91874_simpletest.py @@ -42,7 +42,12 @@ with open("/display-ruler.bmp", "rb") as f: pic = displayio.OnDiskBitmap(f) # Create a Tilegrid with the bitmap and put in the displayio group - t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) + # CircuitPython 6 & 7 compatible + t = displayio.TileGrid( + pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) + ) + # CircuitPython 7 compatible only + # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) g.append(t) # Place the display group on the screen (does not refresh)