Merge pull request #1 from keyboardio/f/led-api-update

Updated to use the new LEDMode/LEDControl API
pull/365/head
Gergely Nagy 7 years ago committed by GitHub
commit b40874edfc

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