@@ -129,7 +129,7 @@ def __init__(self, ble, display, circ, heart=True, speed=True, cad=True, ams=Tru
129129
130130 self .start = time .time ()
131131
132- self .splash = displayio .Group (max_size = 25 )
132+ self .splash = displayio .Group ()
133133 self .loading_group = displayio .Group ()
134134
135135 self ._load_fonts ()
@@ -140,9 +140,9 @@ def __init__(self, ble, display, circ, heart=True, speed=True, cad=True, ams=Tru
140140
141141 self .text_group = displayio .Group ()
142142 self .status = label .Label (font = self .arial12 , x = 10 , y = 200 ,
143- text = '' , color = self .YELLOW , max_glyphs = 30 )
143+ text = '' , color = self .YELLOW )
144144 self .status1 = label .Label (font = self .arial12 , x = 10 , y = 220 ,
145- text = '' , color = self .YELLOW , max_glyphs = 30 )
145+ text = '' , color = self .YELLOW )
146146
147147 self .text_group .append (self .status )
148148 self .text_group .append (self .status1 )
@@ -154,7 +154,11 @@ def show_splash(self):
154154 """
155155 if self .debug :
156156 return
157- with open ('blinka-pyloton.bmp' , 'rb' ) as bitmap_file :
157+
158+ blinka_bitmap = "blinka-pyloton.bmp"
159+
160+ # Compatible with CircuitPython 6 & 7
161+ with open (blinka_bitmap , 'rb' ) as bitmap_file :
158162 bitmap1 = displayio .OnDiskBitmap (bitmap_file )
159163 tile_grid = displayio .TileGrid (bitmap1 , pixel_shader = getattr (bitmap1 , 'pixel_shader' , displayio .ColorConverter ()))
160164 self .loading_group .append (tile_grid )
@@ -165,6 +169,16 @@ def show_splash(self):
165169 self .loading_group .append (rect )
166170 self .loading_group .append (status_heading )
167171
172+ # # Compatible with CircuitPython 7+
173+ # bitmap1 = displayio.OnDiskBitmap(blinka_bitmap)
174+ # tile_grid = displayio.TileGrid(bitmap1, pixel_shader=bitmap1.pixel_shader)
175+ # self.loading_group.append(tile_grid)
176+ # self.display.show(self.loading_group)
177+ # status_heading = label.Label(font=self.arial16, x=80, y=175,
178+ # text="Status", color=self.YELLOW)
179+ # rect = Rect(0, 165, 240, 75, fill=self.PURPLE)
180+ # self.loading_group.append(rect)
181+ # self.loading_group.append(status_heading)
168182
169183 def _load_fonts (self ):
170184 """
@@ -413,7 +427,7 @@ def _label_maker(self, text, x, y, font=None):
413427 """
414428 if not font :
415429 font = self .arial24
416- return label .Label (font = font , x = x , y = y , text = text , color = self .WHITE , max_glyphs = 30 )
430+ return label .Label (font = font , x = x , y = y , text = text , color = self .WHITE )
417431
418432
419433 def _get_y (self ):
0 commit comments