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);
}
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;

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

Loading…
Cancel
Save