File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -342,10 +342,13 @@ func (a *Advertisement) Configure(options AdvertisementOptions) error {
342
342
}
343
343
344
344
a .serviceUUIDs = append ([]UUID {}, options .ServiceUUIDs ... )
345
- a .interval = uint16 (options .Interval )
346
- if a .interval == 0 {
347
- a .interval = 0x0800 // default interval is 1.28 seconds
345
+ if options .Interval == 0 {
346
+ // Pick an advertisement interval recommended by Apple (section 35.5
347
+ // Advertising Interval):
348
+ // https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf
349
+ options .Interval = NewDuration (152500 * time .Microsecond ) // 152.5ms
348
350
}
351
+ a .interval = uint16 (options .Interval )
349
352
a .manufacturerData = append ([]ManufacturerDataElement {}, options .ManufacturerData ... )
350
353
a .serviceData = append ([]ServiceDataElement {}, options .ServiceData ... )
351
354
You can’t perform that action at this time.
0 commit comments