Skip to content

Commit d439a49

Browse files
authored
Don't use "bitmap" property of TileGrid objects
In 8.0, the TIleGrid adds its own "bitmap" property. This interfered, causing the exception reported in guide feedback: ``` Traceback (most recent call last): File "code.py", line 59, in File "code.py", line 40, in __init__ NotImplementedError: Call super().__init__() before accessing native object. ```
1 parent cd11ae3 commit d439a49

File tree

1 file changed

+3
-3
lines changed
  • ulab_Crunch_Numbers_Fast/waterfall

1 file changed

+3
-3
lines changed

ulab_Crunch_Numbers_Fast/waterfall/code.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
class RollingGraph(displayio.TileGrid):
3737
def __init__(self, scale=2):
3838
# Create a bitmap with heatmap colors
39-
self.bitmap = displayio.Bitmap(display.width//scale,
39+
self._bitmap = displayio.Bitmap(display.width//scale,
4040
display.height//scale, len(palette))
41-
super().__init__(self.bitmap, pixel_shader=palette)
41+
super().__init__(self._bitmap, pixel_shader=palette)
4242

4343
self.scroll_offset = 0
4444

4545
def show(self, data):
4646
y = self.scroll_offset
47-
bitmap = self.bitmap
47+
bitmap = self._bitmap
4848

4949
board.DISPLAY.auto_refresh = False
5050
offset = max(0, (bitmap.width-len(data))//2)

0 commit comments

Comments
 (0)