OpenRowingCommunity / c2bluetooth

A Flutter library for interacting with Concept2 PM5 rowing machines over bluetooth
GNU Lesser General Public License v3.0
3 stars 1 forks source link

Introduce an interface to wrap around the bluetooth-library-specific calls #5

Closed MoralCode closed 1 year ago

MoralCode commented 2 years ago

This would allow the specific bluetooth library in use to potentially be swapped out and/or made the responsibility of the application, but also may provide more surface for bugs and/or issue reports as people will likely use different bluetooth libraries

Some Bluetooth backends to consider when designing such an interface:

MoralCode commented 1 year ago

Fully abstracting the bluetooth library seems like it may not be especially useful and may increase debugging complexity if clients are allowed to use different bluetooth backends what may have different bugs.

in the future the interaction with the bluetooth library may be beneficial to abstract but for now there doesnt seem to be enough value to justify the additional effort.

17 already implements a rewrite of the backend so that may provide useful information for how to create an API thats reasonably compatible with any bluetooth backend.

given the current state of flutter bluetooth libraries (TL;DR "not a lot of great, well-maintained options") this ability to swap between them may be something that could help to abstract into another library for other bluetooth projects