|
|
@ -15,9 +15,12 @@ LEDControl_::LEDControl_(void) {
|
|
|
|
led_dark_blue.r = 0;
|
|
|
|
led_dark_blue.r = 0;
|
|
|
|
led_dark_blue.g = 0;
|
|
|
|
led_dark_blue.g = 0;
|
|
|
|
led_dark_blue.b = 127;
|
|
|
|
led_dark_blue.b = 127;
|
|
|
|
led_bright_red.r = 255;
|
|
|
|
led_red.r = 255;
|
|
|
|
led_bright_red.g = 0;
|
|
|
|
led_red.g = 0;
|
|
|
|
led_bright_red.b = 0;
|
|
|
|
led_red.b = 0;
|
|
|
|
|
|
|
|
led_dark_red.r = 127;
|
|
|
|
|
|
|
|
led_dark_red.g = 0;
|
|
|
|
|
|
|
|
led_dark_red.b = 0;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -101,7 +104,7 @@ void LEDControl_::effect_numlock_update() {
|
|
|
|
led_set_crgb_at(i, led_off);
|
|
|
|
led_set_crgb_at(i, led_off);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (uint8_t i = 44; i < LED_COUNT; i++) {
|
|
|
|
for (uint8_t i = 44; i < LED_COUNT; i++) {
|
|
|
|
led_set_crgb_at(i, led_bright_red);
|
|
|
|
led_set_crgb_at(i, led_red);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
led_compute_breath();
|
|
|
|
led_compute_breath();
|
|
|
|
led_set_crgb_at(60, led_breathe); // make numlock breathe
|
|
|
|
led_set_crgb_at(60, led_breathe); // make numlock breathe
|
|
|
@ -138,15 +141,15 @@ void LEDControl_::effect_chase_update() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
current_chase_counter = 0;
|
|
|
|
current_chase_counter = 0;
|
|
|
|
led_set_crgb_at(pos - chase_pixels, led_off);
|
|
|
|
led_set_crgb_at(pos - (chase_sign* chase_pixels), led_off);
|
|
|
|
led_set_crgb_at(pos, led_dark_blue);
|
|
|
|
led_set_crgb_at(pos, led_off);
|
|
|
|
|
|
|
|
|
|
|
|
pos += chase_pixels;
|
|
|
|
pos += chase_sign;
|
|
|
|
if (pos > LED_COUNT || pos < 0) {
|
|
|
|
if (pos >= LED_COUNT || pos <= 0) {
|
|
|
|
chase_pixels = -chase_pixels;
|
|
|
|
chase_sign = -chase_sign;
|
|
|
|
pos += chase_pixels;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
led_set_crgb_at(pos, led_blue);
|
|
|
|
led_set_crgb_at(pos, led_blue);
|
|
|
|
|
|
|
|
led_set_crgb_at(pos - (chase_sign * chase_pixels), led_red);
|
|
|
|
led_sync();
|
|
|
|
led_sync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -210,7 +213,7 @@ void LEDControl_::boot_animation() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LEDControl_::type_letter(uint8_t letter) {
|
|
|
|
void LEDControl_::type_letter(uint8_t letter) {
|
|
|
|
led_set_crgb_at(letter,led_bright_red);
|
|
|
|
led_set_crgb_at(letter,led_red);
|
|
|
|
led_sync();
|
|
|
|
led_sync();
|
|
|
|
delay(250);
|
|
|
|
delay(250);
|
|
|
|
led_set_crgb_at(letter,led_off);
|
|
|
|
led_set_crgb_at(letter,led_off);
|
|
|
|