Make the hue configurable

Fixes #3.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/365/head
Gergely Nagy 6 years ago
parent 75cb920de6
commit 9592ef1ae8

@ -27,10 +27,15 @@ void setup() {
} }
``` ```
## Plugin methods ## Plugin properties
The plugin provides the `LEDBreatheEffect` object, which has no public methods or The plugin provides the `LEDBreatheEffect` object, which has a single property:
properties, outside of those provided by all LED modes.
### `.hue`
> The hue of the breathe effect.
>
> Defaults to 170.
## Dependencies ## Dependencies

@ -2,7 +2,7 @@
namespace kaleidoscope { namespace kaleidoscope {
void LEDBreatheEffect::update(void) { void LEDBreatheEffect::update(void) {
cRGB color = breath_compute(); cRGB color = breath_compute(hue);
::LEDControl.set_all_leds_to(color); ::LEDControl.set_all_leds_to(color);
} }
} }

@ -8,6 +8,8 @@ class LEDBreatheEffect : public LEDMode {
public: public:
LEDBreatheEffect(void) {} LEDBreatheEffect(void) {}
uint8_t hue = 170;
protected: protected:
void update(void) final; void update(void) final;
}; };

Loading…
Cancel
Save