Allow the nice!view widget to display the status of each profile by:
not adding a circle around the number if the profile is not bound
drawing a dashed circle around the number if a profile is bound but not connected (device not live, explicitly disconnected with BT_DISC, ...)
Example:
solid circle: connected
dashed circle: not connected
no circle: not bound
filled circle: selected
This requires minor refactoring in BLE code to expose state methods by profile address rather than only by the current profile.
One issue I can see so far is that event's are indeed raised when the current profile changes but not when other profiles change from what I can tell (eg. a device other that the selected one disconnects).
I have tried addressing the BT_DISC case by adding a raise_profile_changed_event(); in zmk_ble_prof_disconnect() and that seems to work but I'm pretty sure that's not the proper way to do it (if there is a proper way to do it currently, see comment). Maybe that needs to be addressed separately from this PR?
Allow the nice!view widget to display the status of each profile by:
BT_DISC
, ...)Example:![niceview-profiles](https://github.com/zmkfirmware/zmk/assets/489715/32fd5652-8f61-48f4-b0ea-d18bd4ee6058)
This requires minor refactoring in BLE code to expose state methods by profile address rather than only by the current profile.
One issue I can see so far is that event's are indeed raised when the current profile changes but not when other profiles change from what I can tell (eg. a device other that the selected one disconnects).
I have tried addressing the
BT_DISC
case by adding araise_profile_changed_event();
inzmk_ble_prof_disconnect()
and that seems to work but I'm pretty sure that's not the proper way to do it (if there is a proper way to do it currently, see comment). Maybe that needs to be addressed separately from this PR?