We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f58e21 commit 2d919a6Copy full SHA for 2d919a6
adafruit_ble_adafruit/adafruit_service.py
@@ -69,11 +69,14 @@ class AdafruitServerAdvertisement(
69
pid = ManufacturerDataField(_PID_DATA_ID, "<H")
70
"""The USB PID (product id) for this board."""
71
72
- def __init__(self):
73
- super().__init__()
74
- self.connectable = True
75
- self.flags.general_discovery = True
76
- self.flags.le_only = True
+ def __init__(self, *, entry=None):
+ super().__init__(entry=entry)
+ if entry is None:
+ # This is not a received advertisement, but one that will be sent,
+ # so do further initialization.
77
+ self.connectable = True
78
+ self.flags.general_discovery = True
79
+ self.flags.le_only = True
80
81
82
class AdafruitService(Service):
0 commit comments