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

BLE Reconnect #61

Open
arsab opened this issue Jul 5, 2019 · 1 comment
Open

BLE Reconnect #61

arsab opened this issue Jul 5, 2019 · 1 comment

Comments

@arsab
Copy link
Contributor

arsab commented Jul 5, 2019

When connection is lost with BLE sensor temporarly (e.g. increase distance and come back)
we need to reconnect through user interfaces.

Would it make sense to reconnect through a periodic audit.
e.g. periodically recall "updateConnections()" ? and how ?
or detect loss and re trigger ?

@arsab
Copy link
Contributor Author

arsab commented Jul 20, 2019

I discover this nice application day after day.
Realized that SensorStateButton helps to refresh connection.
AAT/app/src/main/java/ch/bailu/aat/views/description/SensorStateButton.java

In interim I patched TrackerStateButton to tap few times to "react" on top of its main function
in Cockpit display see below..

Maybe the best (lower battery impact) solution is to have a "Click" update with HR or Cadence number buttons (like altitude number button)

AAT/app/src/main/java/ch/bailu/aat/views/description/TrackerStateButton.java

@OverRide
public void onClick(View v) {
if (v==this) {
new InsideContext(scontext) {
@OverRide
public void run() {
scontext.getTrackerService().getState().onStartPauseResume();
}
};
new InsideContext(scontext) {
@OverRide
public void run() {
scontext.getSensorService().updateConnections();
}
};
}
}

@arsab arsab mentioned this issue Oct 3, 2019
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

No branches or pull requests

1 participant