zmk
zmk copied to clipboard
feat(Underglow): Battery state of charge effect
This adds a state of charge effect to RGB underglow. Potentially a duplicate of #935 however this is significantly different
- I use the battery library to get state of charge instead of the Bluetooth BAS function to handle applications where BAS was disabled
- Using HSB instead of RGB and inheriting from the state.colour allows the previously set or default brightness to be used in calculating the colour, this has to temporarily override the saturation to show the colours properly though
- Uses the new battery chosen node binding and like the other PR displays blue when no battery is configured. to avoid any ambiguity
- Added the effect to KConfig
Rebased and tweaked to add a void arg to the effect function in line with the other rgb effects