diff --git a/README.rst b/README.rst index f09f0bd..b036fd9 100644 --- a/README.rst +++ b/README.rst @@ -28,8 +28,6 @@ This is easily achieved by downloading Installing from PyPI ===================== -.. note:: This library is not available on PyPI yet. Install documentation is included - as a standard element. Stay tuned for PyPI availability! On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from PyPI `_. To install for current user: @@ -92,7 +90,13 @@ 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/examples/il0398_4.2_color.py b/examples/il0398_4.2_color.py index 40cd61b..50c1a3d 100644 --- a/examples/il0398_4.2_color.py +++ b/examples/il0398_4.2_color.py @@ -43,7 +43,12 @@ with open("/display-ruler.bmp", "rb") as f: 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/examples/il0398_simpletest.py b/examples/il0398_simpletest.py index f26c02f..c7a7d6e 100644 --- a/examples/il0398_simpletest.py +++ b/examples/il0398_simpletest.py @@ -36,7 +36,12 @@ with open("/display-ruler.bmp", "rb") as f: 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)