add saturation option

pull/365/head
Shriramana Sharma 6 years ago
parent 31ccb5e83d
commit 4674fe1f10

@ -35,7 +35,13 @@ The plugin provides the `LEDBreatheEffect` object, which has a single property:
> The hue of the breathe effect. > The hue of the breathe effect.
> >
> Defaults to 170. > Defaults to 170, a blue hue.
### `.saturation`
> The color saturation of the breathe effect.
>
> Defaults to 255, the maximum.
## Dependencies ## Dependencies

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

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

Loading…
Cancel
Save