|
|
@ -21,32 +21,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace kaleidoscope {
|
|
|
|
namespace kaleidoscope {
|
|
|
|
|
|
|
|
|
|
|
|
bool BootGreetingEffect::done_;
|
|
|
|
bool BootGreetingEffect::done_;
|
|
|
|
|
|
|
|
|
|
|
|
void BootGreetingEffect::begin (void) {
|
|
|
|
void BootGreetingEffect::begin(void) {
|
|
|
|
Kaleidoscope.useLoopHook(loopHook);
|
|
|
|
Kaleidoscope.useLoopHook(loopHook);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void BootGreetingEffect::loopHook(const bool post_clear) {
|
|
|
|
void BootGreetingEffect::loopHook(const bool post_clear) {
|
|
|
|
if (!post_clear || done_)
|
|
|
|
if (!post_clear || done_)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (millis() > 10000) {
|
|
|
|
if (millis() > 10000) {
|
|
|
|
done_ = true;
|
|
|
|
done_ = true;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (uint8_t r = 0; r < ROWS; r++) {
|
|
|
|
for (uint8_t r = 0; r < ROWS; r++) {
|
|
|
|
for (uint8_t c = 0; c < COLS; c++) {
|
|
|
|
for (uint8_t c = 0; c < COLS; c++) {
|
|
|
|
Key k = Layer.lookupOnActiveLayer(r, c);
|
|
|
|
Key k = Layer.lookupOnActiveLayer(r, c);
|
|
|
|
|
|
|
|
|
|
|
|
if (k == Key_LEDEffectNext) {
|
|
|
|
if (k == Key_LEDEffectNext) {
|
|
|
|
cRGB color = breath_compute();
|
|
|
|
cRGB color = breath_compute();
|
|
|
|
LEDControl.setCrgbAt(r, c, color);
|
|
|
|
LEDControl.setCrgbAt(r, c, color);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kaleidoscope::BootGreetingEffect BootGreetingEffect;
|
|
|
|
kaleidoscope::BootGreetingEffect BootGreetingEffect;
|
|
|
|