Merge pull request #4 from keyboardio/f/settable-hue

Make the hue configurable
pull/365/head
Jesse Vincent 7 years ago committed by GitHub
commit 31ccb5e83d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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