diff --git a/examples/KeyboardioFirmware/KeyboardioFirmware.ino b/examples/KeyboardioFirmware/KeyboardioFirmware.ino index 9f342368..a138e08d 100644 --- a/examples/KeyboardioFirmware/KeyboardioFirmware.ino +++ b/examples/KeyboardioFirmware/KeyboardioFirmware.ino @@ -7,7 +7,7 @@ #include "KeyboardioFirmware.h" #include "generated/keymaps.h" -#include "LED-BootAnimation.h" +#include "BootAnimation.h" #include "LED-SolidColor.h" #include "LED-Numlock.h" #include "LED-BreatheEffect.h" @@ -23,7 +23,6 @@ uint8_t temporary_keymap = 0; const Key keymaps[][ROWS][COLS] PROGMEM = { KEYMAP_LIST }; -static LEDBootAnimation bootAnimation; static LEDSolidColor solidRed (100, 0, 0); static LEDSolidColor solidOrange (100, 30, 0); static LEDSolidColor solidYellow (90, 70, 0); @@ -41,6 +40,7 @@ static LEDNumlock numLockEffect (NUMPAD_KEYMAP); void setup() { Keyboardio.setup(KEYMAPS); + bootAnimation(); } diff --git a/src/LED-BootAnimation.cpp b/src/BootAnimation.cpp similarity index 79% rename from src/LED-BootAnimation.cpp rename to src/BootAnimation.cpp index 728c4eb1..3c865e55 100644 --- a/src/LED-BootAnimation.cpp +++ b/src/BootAnimation.cpp @@ -1,4 +1,5 @@ -#include "LED-BootAnimation.h" +#include "BootAnimation.h" +#include "KeyboardConfig.h" static void type_letter(uint8_t letter) { @@ -10,12 +11,8 @@ type_letter(uint8_t letter) { delay(10); } -LEDBootAnimation::LEDBootAnimation (void) { - LEDControl.mode_add (this); -} - void -LEDBootAnimation::setup (void) { +bootAnimation (void) { LEDControl.set_all_leds_to(0, 0, 0); type_letter(LED_K); diff --git a/src/BootAnimation.h b/src/BootAnimation.h new file mode 100644 index 00000000..f8b49cac --- /dev/null +++ b/src/BootAnimation.h @@ -0,0 +1,3 @@ +#pragma once + +void bootAnimation(void); diff --git a/src/LED-BootAnimation.h b/src/LED-BootAnimation.h deleted file mode 100644 index dcd4f616..00000000 --- a/src/LED-BootAnimation.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "LEDControl.h" - -class LEDBootAnimation : LEDMode { - public: - LEDBootAnimation (void); - - virtual void setup (void) final; -};