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

Clarification on broadcast_time arg for broadcast() #9

Open
kevinjwalters opened this issue Jun 5, 2020 · 1 comment
Open

Clarification on broadcast_time arg for broadcast() #9

kevinjwalters opened this issue Jun 5, 2020 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@kevinjwalters
Copy link

kevinjwalters commented Jun 5, 2020

The broadcast function in adafruit_ble_broadcastnet takes a broadcast_time argument with a default of 0.1 (100ms). The documentation is currently:

Broadcasts the given measurement for the given broadcast time. If extended is False and the
measurement would be too long, it will be split into multiple measurements for transmission.

This doesn't explicitly explain that if the message is split then the function actually takes N * broadcast_time. There's clearly two approaches here, a cap for the overall broadcast time for all "sub" packets or a period per packet to send for. I'm not sure which approach is the best but whatever is intended/implemented should be documented.

This also offers no control over the advertising interval. It's using _ble.start_advertising (note: _). The C code has advertising default interval as (0.1f). If the intent is to send one packet then maybe there's a better way to do that, e.g. 0.020 interval and wait for 0.020 sounds like it achieve the same thing for sending a single packet but that returns at least 80ms earlier to caller offering more opportunity to do useful processing.

@evaherrada evaherrada added the documentation Improvements or additions to documentation label Jun 30, 2020
@tekktrik tekktrik mentioned this issue Dec 10, 2021
@tekktrik
Copy link
Member

Not sure if this fixes everything in this issue, but the documentation has been updated to make the timing issue clearer. Let me know if that addresses the scope of this issue!

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

No branches or pull requests

3 participants