-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Move music control to Zbus and remove #ifdef
#126
Conversation
I´m currently on |
I'm thinking if using zbus for stuff like this is necessary. It's not like this info needs to be propogated around the software, it just goes to either phone "backend". Maybe just a simple API is easier.
|
What is the downside of using zbus? I was under the impression that the thing was moving towards not using callbacks, but both solution works. |
Possible downside, maybe readability and more boilerplate code to define the zbus events etc. What do you think of just using one event for all phone communication, that will create less boilerplate zbus code. The data type can be an union with an ID? @ldab |
|
Ok, I'll merge this and then it can be cleaned up to make it same everywhere |
@jakkra sounds like a good idea. I had the idea already for BLE connected and disconnected event but it can be expanded with additional stuff. This can also provide some sort of API for the Bluetooth communication in other apps. |
Nice, BUT for the Bluetooth stuff, I think apps should use Zephyr API directly, it has good methods to get callbacks on connect etc. already. This should be used. We can add other stuff related to connections on zbus if we see a need. |
ble_comm.c
could be refactored and some of it moved toble_gadgetbridge.c
for example,music_control_event_callback
looks a bit misplaced now, but it should work#112 ?