Repository navigation
Remember sensors and reconnect them at launch - #79
Merged
Merged
Conversation
Bluetooth sensors are remembered once connected. At launch the app looks for them for three minutes and connects each one as it wakes, and looks again when the Devices page or ride setup opens. The Devices page shows the ones it's still looking for, with Forget. Remove forgets a sensor too. The ANT+ stick is turned on again at launch if it was on, since ANT+ pairs whichever sensors are near rather than a list.
pepperstm
added a commit
that referenced
this pull request
Nov 12, 2026
## What and why A Linux user's xoss speed sensor wouldn't connect (#70). BlueZ kept cancelling the connection, with `le-connection-abort-by-local` or `Service discovery timed out`. BlueZ often does that to a connection made while the radio is scanning, and VeloPopuli was doing exactly that: - After you picked a device to add, the scan kept running for up to 0.6 s while it connected. On Linux the scan is now stopped first. - The search for remembered sensors (#79) connects while scanning. - Picking a device to add while remembered sensors were being looked for also connected with the scan running. Every Bluetooth connection now goes through one path. It counts the connections under way and, on Linux, stops the scan first, then starts it again once none are left and a search still wants it. macOS and Windows connect fine while scanning, so they're unchanged. ## Checked - `npm run check` passes, and CI's Linux build compiles the Linux path. - I couldn't test it on Linux hardware, so it needs a retest by the reporter on #70. Refs #70
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Sensors weren't remembered between launches, so every time the app opened you had to search for the trainer and heart-rate strap and connect them again.
devices. At launch the app looks for them for three minutes and connects each one as it's heard. It also looks again when the Devices page or ride setup opens, so a trainer switched on later still connects.Checked
npm run checkpasses, with a new test for remembering and forgetting sensors.