Skip to content

Commit

Permalink
fix(nametags): fix attribute error in pairing
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Jun 16, 2021
1 parent e4f95ba commit 5552f2b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apps/nametags/nameservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class NameService(Service):
uuid = StandardUUID(0xfeef)

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 All @@ -29,12 +30,8 @@ def __init__(self):
self._offset = 0
self._bufsize = 0
self._ledstate = False
self._disp_rx = None

def update(self):
if self._disp_rx is None:
self._disp_rx = StreamIn(uuid=StandardUUID(0xfeee), timeout=1.0, buffer_size=8192)

while self._disp_rx.in_waiting > 0:
if self._bufsize == 0:
value = int.from_bytes(self._disp_rx.read(1), 'little')
Expand Down

0 comments on commit 5552f2b

Please sign in to comment.