From 98009264466ac68853480eb77793d6ef9dea0f89 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 24 Dec 2016 12:23:43 +0100 Subject: [PATCH] Do the Keyboardio.setup() early This function registers the layer handler, move it up, before Keyboardio.use, so it will have a chance to run before the other handlers. Signed-off-by: Gergely Nagy --- examples/KeyboardioFirmware/KeyboardioFirmware.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/KeyboardioFirmware/KeyboardioFirmware.ino b/examples/KeyboardioFirmware/KeyboardioFirmware.ino index 166f403e..3d34aba8 100644 --- a/examples/KeyboardioFirmware/KeyboardioFirmware.ino +++ b/examples/KeyboardioFirmware/KeyboardioFirmware.ino @@ -48,6 +48,8 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { } void setup() { + Keyboardio.setup(KEYMAP_SIZE); + Keyboardio.use(&LEDOff, &solidRed, &solidOrange, &solidYellow, &solidGreen, &solidBlue, &solidIndigo, &solidViolet, &LEDBreatheEffect, &LEDRainbowEffect, &LEDChaseEffect, &numLockEffect, @@ -56,7 +58,6 @@ void setup() { &MouseKeys, NULL); - Keyboardio.setup(KEYMAP_SIZE); LEDOff.activate(); }