|
|
@ -43,14 +43,14 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
|
|
|
|
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
|
|
|
|
if (!key_toggled_on (keyState))
|
|
|
|
if (!key_toggled_on(keyState))
|
|
|
|
return MACRO_NONE;
|
|
|
|
return MACRO_NONE;
|
|
|
|
|
|
|
|
|
|
|
|
if (macroIndex == 0) {
|
|
|
|
if (macroIndex == 0) {
|
|
|
|
for (uint8_t i = Key_A.keyCode; i <= Key_0.keyCode; i++) {
|
|
|
|
for (uint8_t i = Key_A.keyCode; i <= Key_0.keyCode; i++) {
|
|
|
|
LEDControl.set_all_leds_to (0, 0, 0);
|
|
|
|
LEDControl.set_all_leds_to(0, 0, 0);
|
|
|
|
LEDControl.led_sync ();
|
|
|
|
LEDControl.led_sync();
|
|
|
|
delay (100);
|
|
|
|
delay(100);
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t col = 2;
|
|
|
|
uint8_t col = 2;
|
|
|
|
if (i % 2)
|
|
|
|
if (i % 2)
|
|
|
@ -58,47 +58,47 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
|
|
|
|
|
|
|
|
|
|
|
|
for (uint8_t step = 0; step <= 0xf0; step += 8) {
|
|
|
|
for (uint8_t step = 0; step <= 0xf0; step += 8) {
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.display ({i, 0}, col);
|
|
|
|
AlphaSquare.display({i, 0}, col);
|
|
|
|
delay (10);
|
|
|
|
delay(10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (uint8_t step = 0xff; step >= 8; step -= 8) {
|
|
|
|
for (uint8_t step = 0xff; step >= 8; step -= 8) {
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.display ({i, 0}, col);
|
|
|
|
AlphaSquare.display({i, 0}, col);
|
|
|
|
delay (10);
|
|
|
|
delay(10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delay (100);
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LEDControl.set_all_leds_to (0, 0, 0);
|
|
|
|
LEDControl.set_all_leds_to(0, 0, 0);
|
|
|
|
LEDControl.led_sync ();
|
|
|
|
LEDControl.led_sync();
|
|
|
|
delay (100);
|
|
|
|
delay(100);
|
|
|
|
for (uint8_t step = 0; step <= 0xf0; step += 8) {
|
|
|
|
for (uint8_t step = 0; step <= 0xf0; step += 8) {
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
|
|
|
|
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
|
|
|
|
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
|
|
|
|
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
|
|
|
|
delay (10);
|
|
|
|
delay(10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (uint8_t step = 0xff; step >= 8; step -= 8) {
|
|
|
|
for (uint8_t step = 0xff; step >= 8; step -= 8) {
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.color = { step, step, step };
|
|
|
|
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
|
|
|
|
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 2);
|
|
|
|
AlphaSquare.display (KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
|
|
|
|
AlphaSquare.display(KaleidoscopePlugins::AlphaSquareSymbols::Lambda, 10);
|
|
|
|
delay (10);
|
|
|
|
delay(10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delay (100);
|
|
|
|
delay(100);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LEDControl.set_all_leds_to (0, 0, 0);
|
|
|
|
LEDControl.set_all_leds_to(0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
return MACRO_NONE;
|
|
|
|
return MACRO_NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setup () {
|
|
|
|
void setup() {
|
|
|
|
Kaleidoscope.setup ();
|
|
|
|
Kaleidoscope.setup();
|
|
|
|
|
|
|
|
|
|
|
|
USE_PLUGINS (&AlphaSquare, &AlphaSquareEffect, &Macros);
|
|
|
|
USE_PLUGINS(&AlphaSquare, &AlphaSquareEffect, &Macros);
|
|
|
|
AlphaSquare.color = { 0xcb, 0xc0, 0xff };
|
|
|
|
AlphaSquare.color = { 0xcb, 0xc0, 0xff };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void loop () {
|
|
|
|
void loop() {
|
|
|
|
Kaleidoscope.loop ();
|
|
|
|
Kaleidoscope.loop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|