BootAnimation shall not be a LED effect

Having the boot animation as a LED effect, making it function as an
"off" state, while a novel idea, is confusing. For this reason, make it
just a simple function we can call from the Sketch's `setup()` method.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/49/head
Gergely Nagy 8 years ago
parent cedb0565e7
commit 83a77bc544

@ -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();
}

@ -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);

@ -0,0 +1,3 @@
#pragma once
void bootAnimation(void);

@ -1,10 +0,0 @@
#pragma once
#include "LEDControl.h"
class LEDBootAnimation : LEDMode {
public:
LEDBootAnimation (void);
virtual void setup (void) final;
};
Loading…
Cancel
Save