zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.48k stars 2.56k forks source link

nice!view: individual profile status #2265

Open snoyer opened 3 months ago

snoyer commented 3 months ago

Allow the nice!view widget to display the status of each profile by:

Example: niceview-profiles


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?