Skip to content

Commit f6e3c0a

Browse files
committed
prefix -> match_prefixes
1 parent 10c82e3 commit f6e3c0a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

adafruit_ble_adafruit/adafruit_service.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ class AdafruitServerAdvertisement(Advertisement):
6666
"""Advertise the Adafruit company ID and the board USB PID.
6767
"""
6868

69-
prefix = struct.pack(
70-
"<BBHBH",
71-
0x6,
72-
_MANUFACTURING_DATA_ADT,
73-
_ADAFRUIT_COMPANY_ID,
74-
struct.calcsize("<HH"),
75-
_PID_DATA_ID,
69+
match_prefixes = (
70+
struct.pack(
71+
"<BHBH",
72+
_MANUFACTURING_DATA_ADT,
73+
_ADAFRUIT_COMPANY_ID,
74+
struct.calcsize("<HH"),
75+
_PID_DATA_ID,
76+
),
7677
)
7778
manufacturer_data = LazyObjectField(
7879
ManufacturerData,
@@ -90,10 +91,6 @@ def __init__(self):
9091
self.flags.general_discovery = True
9192
self.flags.le_only = True
9293

93-
@classmethod
94-
def matches(cls, entry):
95-
return entry.matches(cls.prefix, all=False)
96-
9794

9895
class AdafruitService(Service):
9996
"""Common superclass for all Adafruit board services."""

0 commit comments

Comments
 (0)