Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix advertising parameter usage for legacy advertising #633

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

markusjellitsch
Copy link
Contributor

when using start_adverting() the usage of advertising_interval_min and advertising_interval_max for legacy advertising is not consistent with extended advertising (The advertising_interval given as input param should be calculated in 0.625 units)

@zxzxwu
Copy link
Collaborator

zxzxwu commented Jan 23, 2025

This API has been widely used, so we shouldn't roughly alter its spec. At least we should check its type to determine whether it should be considered 1 or 0.625 ms.

@markusjellitsch
Copy link
Contributor Author

Yes understand. At the moment it's a bit confusing and inconsistent, when you call start_advertising()and legacy adv is used it is 0.625 ms, for extended adv it is 1.

@barbibulle
Copy link
Collaborator

I think the change here makes sense. It was never the intention of the API to accept values in units of 0.625 (as a general rule, the Device API tries to hide internal spec details). All those intervals are supposed to be in milliseconds. In fact, for extended advertising, that's what the implementation does.
So this should be considered a bug fix, not an API change.

@barbibulle
Copy link
Collaborator

@markusjellitsch could you run the formatter (check with invoke project.pre-commit for details) so that the linter/formatter checks can pass before we merge the change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants