@@ -171,28 +171,15 @@ def show_splash(self):
171171
172172 blinka_bitmap = "blinka-pyloton.bmp"
173173
174- # Compatible with CircuitPython 6 & 7
175- with open (blinka_bitmap , 'rb' ) as bitmap_file :
176- bitmap1 = displayio .OnDiskBitmap (bitmap_file )
177- tile_grid = displayio .TileGrid (bitmap1 , pixel_shader = getattr (bitmap1 , 'pixel_shader' , displayio .ColorConverter ()))
178- self .loading_group .append (tile_grid )
179- self .display .show (self .loading_group )
180- status_heading = label .Label (font = self .arial16 , x = 80 , y = 175 ,
181- text = "Status" , color = self .YELLOW )
182- rect = Rect (0 , 165 , 240 , 75 , fill = self .PURPLE )
183- self .loading_group .append (rect )
184- self .loading_group .append (status_heading )
185-
186- # # Compatible with CircuitPython 7+
187- # bitmap1 = displayio.OnDiskBitmap(blinka_bitmap)
188- # tile_grid = displayio.TileGrid(bitmap1, pixel_shader=bitmap1.pixel_shader)
189- # self.loading_group.append(tile_grid)
190- # self.display.show(self.loading_group)
191- # status_heading = label.Label(font=self.arial16, x=80, y=175,
192- # text="Status", color=self.YELLOW)
193- # rect = Rect(0, 165, 240, 75, fill=self.PURPLE)
194- # self.loading_group.append(rect)
195- # self.loading_group.append(status_heading)
174+ bitmap1 = displayio .OnDiskBitmap (blinka_bitmap )
175+ tile_grid = displayio .TileGrid (bitmap1 , pixel_shader = bitmap1 .pixel_shader )
176+ self .loading_group .append (tile_grid )
177+ self .display .root_group = self .loading_group
178+ status_heading = label .Label (font = self .arial16 , x = 80 , y = 175 ,
179+ text = "Status" , color = self .YELLOW )
180+ rect = Rect (0 , 165 , 240 , 75 , fill = self .PURPLE )
181+ self .loading_group .append (rect )
182+ self .loading_group .append (status_heading )
196183
197184 def _load_fonts (self ):
198185 """
@@ -495,7 +482,7 @@ def setup_display(self):
495482
496483 self .splash .append (sprites )
497484
498- self .display .show ( self .splash )
485+ self .display .root_group = self .splash
499486 while self .loading_group :
500487 self .loading_group .pop ()
501488
0 commit comments