zmk icon indicating copy to clipboard operation
zmk copied to clipboard

feat(Underglow): Battery state of charge effect

Open ReFil opened this issue 3 years ago • 1 comments

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

ReFil avatar Sep 13 '22 14:09 ReFil

Rebased and tweaked to add a void arg to the effect function in line with the other rgb effects

ReFil avatar Feb 12 '24 14:02 ReFil