File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -334,18 +334,18 @@ def enter(self):
334334 pyportal .splash .append (ta )
335335 pyportal .splash .append (self .weather_icon )
336336 if snooze_time :
337+ # CircuitPython 6 & 7 compatible
337338 if self .snooze_file :
338339 self .snooze_file .close ()
339340 self .snooze_file = open ('/icons/zzz.bmp' , "rb" )
340341 icon = displayio .OnDiskBitmap (self .snooze_file )
341- try :
342- icon_sprite = displayio .TileGrid (icon ,
343- pixel_shader = getattr (icon , 'pixel_shader' , displayio .ColorConverter ()),
344- x = 0 , y = 0 )
345- except TypeError :
346- icon_sprite = displayio .TileGrid (icon ,
347- pixel_shader = getattr (icon , 'pixel_shader' , displayio .ColorConverter ()),
348- position = (0 , 0 ))
342+ icon_sprite = displayio .TileGrid (icon ,
343+ pixel_shader = getattr (icon , 'pixel_shader' , displayio .ColorConverter ()))
344+
345+ # # CircuitPython 7+ compatible
346+ # icon = displayio.OnDiskBitmap("/icons/zzz.bmp")
347+ # icon_sprite = displayio.TileGrid(icon, pixel_shader=icon.pixel_shader)
348+
349349 self .snooze_icon .append (icon_sprite )
350350 pyportal .splash .append (self .snooze_icon )
351351 if alarm_enabled :
You can’t perform that action at this time.
0 commit comments