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: Fix updates for local USB scan entries #136

Merged
merged 2 commits into from
Mar 18, 2024
Merged

fix: Fix updates for local USB scan entries #136

merged 2 commits into from
Mar 18, 2024

Conversation

agittins
Copy link
Owner

  • fix: Fix updates for local USB scan entries

    • There was a bug where the device.scanner data wasn't being updated if the scanner was no longer providing (caching) an advertisement for that device. This mainly showed up on local usb bluetooth dongles, because I think BlueZ would expunge the advert history more quickly than we timeout a distance reading (30 sec by default). The result would be that out-of-range devices would snap to the last distance recorded by the usb adaptor, since we never cleaned it up previously. This might also result in other fixes but I haven't seen cases where proxies would drop advert caches.

    • Removed have_new_stamp and refactored it to be indicated by new_stamp being None. Preserved into self.new_stamp and split the calculate_data() step out of t
      he update_advertisement() step.

  • linting: Changed FastFalling/Rising to snake_case.

- There was a bug where the device.scanner data wasn't being updated if the scanner was no longer providing (caching) an advertisement for that device. This mainly showed up on local usb bluetooth dongles, because I think BlueZ would expunge the advert history more quickly than we timeout a distance reading (30 sec by default). The result would be that out-of-range devices would snap to the last distance recorded by the usb adaptor, since we never cleaned it up previously. This might also result in other fixes but I haven't seen cases where proxies would drop advert caches.

- Removed have_new_stamp and refactored it to be indicated by new_stamp being None. Preserved into self.new_stamp and split the calculate_data() step out of the update_advertisement() step.
@agittins agittins merged commit 87af4b6 into main Mar 18, 2024
3 of 4 checks passed
@agittins agittins deleted the agittins-dev branch March 18, 2024 16:20
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.

1 participant