Updated to use the new LEDMode/LEDControl API

Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
pull/365/head
Gergely Nagy 7 years ago
parent f364a389b1
commit de54b5b279

@ -1,11 +1,10 @@
#include "Kaleidoscope-LEDEffect-Breathe.h"
LEDBreatheEffect_::LEDBreatheEffect_(void) {
}
void LEDBreatheEffect_::update(void) {
namespace kaleidoscope {
void LEDBreatheEffect::update(void) {
cRGB color = breath_compute();
LEDControl.set_all_leds_to(color);
::LEDControl.set_all_leds_to(color);
}
}
LEDBreatheEffect_ LEDBreatheEffect;
kaleidoscope::LEDBreatheEffect LEDBreatheEffect;

@ -3,11 +3,14 @@
#include "Kaleidoscope-LEDControl.h"
#include "LEDUtils.h"
class LEDBreatheEffect_ : public LEDMode {
namespace kaleidoscope {
class LEDBreatheEffect : public LEDMode {
public:
LEDBreatheEffect_(void);
LEDBreatheEffect(void) {}
protected:
void update(void) final;
};
}
extern LEDBreatheEffect_ LEDBreatheEffect;
extern kaleidoscope::LEDBreatheEffect LEDBreatheEffect;

Loading…
Cancel
Save