From dddc014619f4bc235b9a3d3ed3a62cc6ce2cefca Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 11 Feb 2017 00:13:09 +0100 Subject: [PATCH] BootAnimation: Make this part Model01-specific Not all keyboard hardware has per-key LEDs, and not all of them define the LED_* helpers. To make the LEDControl at least compile for these, guard the BootAnimation with a Model01-specific ifdef. Signed-off-by: Gergely Nagy --- src/BootAnimation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BootAnimation.cpp b/src/BootAnimation.cpp index 76c4a336..fe1318eb 100644 --- a/src/BootAnimation.cpp +++ b/src/BootAnimation.cpp @@ -4,6 +4,7 @@ #define EEPROM_BOOT_ANIMATION_LOCATION 1 +#ifdef ARDUINO_AVR_MODEL01 static void type_letter(uint8_t letter) { LEDControl.led_set_crgb_at(letter, {255, 0, 0}); @@ -13,14 +14,15 @@ type_letter(uint8_t letter) { LEDControl.led_sync(); delay(10); } +#endif void bootAnimation (void) { +#ifdef ARDUINO_AVR_MODEL01 if (EEPROM.read (EEPROM_BOOT_ANIMATION_LOCATION)) return; LEDControl.set_all_leds_to(0, 0, 0); - type_letter(LED_K); type_letter(LED_E); type_letter(LED_Y); @@ -37,4 +39,5 @@ bootAnimation (void) { type_letter(LED_9); EEPROM.update (EEPROM_BOOT_ANIMATION_LOCATION, 1); +#endif }