Skip to content

Commit 8821c08

Browse files
authored
Merge pull request #8 from makermelissa/master
Fixed Business Card to work in both CP 5.0 and 4.1
2 parents b62d301 + 5322830 commit 8821c08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_pybadger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ def show_business_card(self, *, image_name=None, name_string=None, name_scale=1,
251251
on_disk_bitmap = displayio.OnDiskBitmap(file_name)
252252
face_image = displayio.TileGrid(on_disk_bitmap, pixel_shader=displayio.ColorConverter())
253253
business_card_splash.append(face_image)
254-
self.display.wait_for_frame()
254+
try:
255+
self.display.refresh(target_frames_per_second=60)
256+
except AttributeError:
257+
self.display.wait_for_frame()
255258
if name_string:
256259
name_group = displayio.Group(scale=name_scale)
257260
name_label = Label(name_font, text=name_string)

0 commit comments

Comments
 (0)