File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 33
33
34
34
from adafruit_ble .advertising import Advertisement , LazyObjectField
35
35
from adafruit_ble .advertising .standard import ManufacturerData , ManufacturerDataField
36
+ from adafruit_ble .advertising .adafruit import (
37
+ MANUFACTURING_DATA_ADT ,
38
+ ADAFRUIT_COMPANY_ID ,
39
+ )
36
40
from adafruit_ble .attributes import Attribute
37
41
from adafruit_ble .characteristics import Characteristic
38
42
from adafruit_ble .characteristics .int import Int32Characteristic , Uint32Characteristic
46
50
pass
47
51
48
52
49
- _MANUFACTURING_DATA_ADT = const (0xFF )
50
- _ADAFRUIT_COMPANY_ID = const (0x0822 )
51
53
_PID_DATA_ID = const (0x0001 ) # This is the same as the Radio data id, unfortunately.
52
54
53
55
@@ -59,17 +61,17 @@ class AdafruitServerAdvertisement(
59
61
match_prefixes = (
60
62
struct .pack (
61
63
"<BHBH" ,
62
- _MANUFACTURING_DATA_ADT ,
63
- _ADAFRUIT_COMPANY_ID ,
64
+ MANUFACTURING_DATA_ADT ,
65
+ ADAFRUIT_COMPANY_ID ,
64
66
struct .calcsize ("<HH" ),
65
67
_PID_DATA_ID ,
66
68
),
67
69
)
68
70
manufacturer_data = LazyObjectField (
69
71
ManufacturerData ,
70
72
"manufacturer_data" ,
71
- advertising_data_type = _MANUFACTURING_DATA_ADT ,
72
- company_id = _ADAFRUIT_COMPANY_ID ,
73
+ advertising_data_type = MANUFACTURING_DATA_ADT ,
74
+ company_id = ADAFRUIT_COMPANY_ID ,
73
75
key_encoding = "<H" ,
74
76
)
75
77
pid = ManufacturerDataField (_PID_DATA_ID , "<H" )
You can’t perform that action at this time.
0 commit comments