Skip to content

Commit

Permalink
Merge pull request #12 from dhalbert/init-entry
Browse files Browse the repository at this point in the history
handle new entry arg for __init__()
  • Loading branch information
tannewt committed Apr 16, 2021
2 parents 1f58e21 + 79e59aa commit 9d87adc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions adafruit_ble_adafruit/adafruit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ class AdafruitServerAdvertisement(
pid = ManufacturerDataField(_PID_DATA_ID, "<H")
"""The USB PID (product id) for this board."""

def __init__(self):
super().__init__()
def __init__(self, *, entry=None):
super().__init__(entry=entry)
# Return early if things have been set by an existing ScanEntry.
if entry:
return
# Creating an advertisement to send.
self.connectable = True
self.flags.general_discovery = True
self.flags.le_only = True
Expand Down

0 comments on commit 9d87adc

Please sign in to comment.