File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 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 {
342342 }
343343
344344 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
348350 }
351+ a .interval = uint16 (options .Interval )
349352 a .manufacturerData = append ([]ManufacturerDataElement {}, options .ManufacturerData ... )
350353 a .serviceData = append ([]ServiceDataElement {}, options .ServiceData ... )
351354
You can’t perform that action at this time.
0 commit comments