Skip to content

Commit

Permalink
Updated nametags to display qr before nameservice init
Browse files Browse the repository at this point in the history
  • Loading branch information
gadirotenberg committed Jun 16, 2021
1 parent 5552f2b commit 30b9614
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/nametags/nameservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

class NameService(Service):
uuid = StandardUUID(0xfeef)
_disp_rx = StreamIn(uuid=StandardUUID(0xfeee), timeout=1.0, buffer_size=8192)

def __init__(self):
NameService._disp_rx = StreamIn(uuid=StandardUUID(0xfeee), timeout=1.0, buffer_size=8192)
super().__init__()
self._bitmap = displayio.Bitmap(badge.display.width, badge.display.height, 2)
self._palette = displayio.Palette(2)
Expand Down
2 changes: 1 addition & 1 deletion apps/nametags/nametags.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
class NametagsApp:
def __init__(self, init_ui = True):
self.ble = BLERadio()
ui.display_qr(self.addr_suffix)
self.nameservice = NameService()
self.advertisement = ProvideServicesAdvertisement(self.nameservice)
self.scan_response = Advertisement()
self.scan_response.complete_name = "BADGE-{}".format(self.addr_suffix)
ui.display_qr(self.addr_suffix)
self.ble.start_advertising(self.advertisement, self.scan_response)

@property
Expand Down

0 comments on commit 30b9614

Please sign in to comment.