Add a brightness API for the rainbow effects

pull/365/head
Jesse Vincent 8 years ago
parent c564d298c7
commit ea90ca09b0

@ -19,6 +19,10 @@ void LEDRainbowEffect_::update(void) {
LEDControl.set_all_leds_to(rainbow); LEDControl.set_all_leds_to(rainbow);
} }
void LEDRainbowEffect_::brightness(byte brightness) {
rainbow.value=brighness;
}
LEDRainbowEffect_ LEDRainbowEffect; LEDRainbowEffect_ LEDRainbowEffect;
// --------- // ---------
@ -47,4 +51,8 @@ void LEDRainbowWaveEffect_::update(void) {
} }
} }
void LEDRainbowWaveEffect_::brightness(byte brightness) {
rainbow.value=brighness;
}
LEDRainbowWaveEffect_ LEDRainbowWaveEffect; LEDRainbowWaveEffect_ LEDRainbowWaveEffect;

@ -7,6 +7,7 @@ class LEDRainbowEffect_ : public LEDMode {
public: public:
LEDRainbowEffect_(void); LEDRainbowEffect_(void);
void brightness(byte);
void update(void) final; void update(void) final;
private: private:
@ -27,6 +28,7 @@ class LEDRainbowWaveEffect_ : public LEDMode {
public: public:
LEDRainbowWaveEffect_(void); LEDRainbowWaveEffect_(void);
void brightness(byte);
void update(void) final; void update(void) final;
private: private:

Loading…
Cancel
Save