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" #include "Kaleidoscope-LEDEffect-Breathe.h"
LEDBreatheEffect_::LEDBreatheEffect_(void) { namespace kaleidoscope {
} void LEDBreatheEffect::update(void) {
void LEDBreatheEffect_::update(void) {
cRGB color = breath_compute(); 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 "Kaleidoscope-LEDControl.h"
#include "LEDUtils.h" #include "LEDUtils.h"
class LEDBreatheEffect_ : public LEDMode { namespace kaleidoscope {
class LEDBreatheEffect : public LEDMode {
public: public:
LEDBreatheEffect_(void); LEDBreatheEffect(void) {}
protected:
void update(void) final; void update(void) final;
}; };
}
extern LEDBreatheEffect_ LEDBreatheEffect; extern kaleidoscope::LEDBreatheEffect LEDBreatheEffect;

Loading…
Cancel
Save