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

Filter RSSI, add signal_strength method #162

Merged
merged 4 commits into from
May 2, 2023
Merged

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    92887f7 View commit details
    Browse the repository at this point in the history
  2. pybricks.common.BLE: Start observing on init.

    Now that we have an explicit set of channels to observe, it makes sense
    to start observing when the class is initialized, instead of starting
    to scan all channels when calling observe on channel X.
    laurensvalk authored and dlech committed May 2, 2023
    Configuration menu
    Copy the full SHA
    256d307 View commit details
    Browse the repository at this point in the history
  3. pybricks.common.BLE: Get rssi via dedicated method.

    Now that the RSSI is filtered, it no longer belongs to a particular
    observe event, so there is no benefit of returning it from the same
    method.
    
    This simplifies the observe method to deal only with data, so it
    is a bit closer to what the broadcast is doing.
    laurensvalk authored and dlech committed May 2, 2023
    Configuration menu
    Copy the full SHA
    eb0b7db View commit details
    Browse the repository at this point in the history
  4. pybricks.common.BLE: return None if no observed data

    This modifies ble.observe() to return None if no data has been observed
    yet or there has been a time out since the last received data. This way
    there is an unambiguous way to check for valid data.
    dlech committed May 2, 2023
    Configuration menu
    Copy the full SHA
    b81218e View commit details
    Browse the repository at this point in the history