diff --git a/src/Kaleidoscope-LEDEffect-Rainbow.cpp b/src/Kaleidoscope-LEDEffect-Rainbow.cpp index 3ea8edc0..a929d9f0 100644 --- a/src/Kaleidoscope-LEDEffect-Rainbow.cpp +++ b/src/Kaleidoscope-LEDEffect-Rainbow.cpp @@ -19,6 +19,10 @@ void LEDRainbowEffect_::update(void) { LEDControl.set_all_leds_to(rainbow); } +void LEDRainbowEffect_::brightness(byte brightness) { + rainbow.value=brighness; +} + LEDRainbowEffect_ LEDRainbowEffect; // --------- @@ -47,4 +51,8 @@ void LEDRainbowWaveEffect_::update(void) { } } +void LEDRainbowWaveEffect_::brightness(byte brightness) { + rainbow.value=brighness; +} + LEDRainbowWaveEffect_ LEDRainbowWaveEffect; diff --git a/src/Kaleidoscope-LEDEffect-Rainbow.h b/src/Kaleidoscope-LEDEffect-Rainbow.h index 8f98bcee..1af33c82 100644 --- a/src/Kaleidoscope-LEDEffect-Rainbow.h +++ b/src/Kaleidoscope-LEDEffect-Rainbow.h @@ -7,6 +7,7 @@ class LEDRainbowEffect_ : public LEDMode { public: LEDRainbowEffect_(void); + void brightness(byte); void update(void) final; private: @@ -27,6 +28,7 @@ class LEDRainbowWaveEffect_ : public LEDMode { public: LEDRainbowWaveEffect_(void); + void brightness(byte); void update(void) final; private: