Skip to content

Commit

Permalink
PandoraHost: compute advertising_interval_max with interval_range
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverBzH committed Jan 12, 2024
1 parent e228597 commit bb02551
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bumble/pandora/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ async def Advertise(
"TODO: add support for extended advertising in Bumble"
)
if advertising_interval := request.interval:
self.device.config.advertising_interval_min = advertising_interval
self.device.config.advertising_interval_max = advertising_interval
if request.interval_range:
raise NotImplementedError("TODO: add support for `request.interval_range`")
self.device.config.advertising_interval_min = int(advertising_interval)
self.device.config.advertising_interval_max = int(advertising_interval)
if interval_range := request.interval_range:
self.device.config.advertising_interval_max += int(interval_range)
if request.primary_phy:
raise NotImplementedError("TODO: add support for `request.primary_phy`")
if request.secondary_phy:
Expand Down

0 comments on commit bb02551

Please sign in to comment.