From efbf158b132bce76374c40663dc2c2f3dc82bf3e Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 24 Aug 2018 23:03:55 -0700 Subject: [PATCH] Bring back the LED breathing effect Signed-off-by: Jesse Vincent --- src/Kaleidoscope-NumPad.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Kaleidoscope-NumPad.cpp b/src/Kaleidoscope-NumPad.cpp index 2d32e666..b621cd50 100644 --- a/src/Kaleidoscope-NumPad.cpp +++ b/src/Kaleidoscope-NumPad.cpp @@ -90,12 +90,13 @@ void NumPad_::setKeyboardLEDColors(void) { kaleidoscope::EventHandlerResult NumPad_::afterEachCycle() { if (!Layer.isOn(numPadLayer)) { cleanupNumlockState(); - } else if (cleanupDone) { - // If it's the first time we're in this loop after toggling the Numpad mode on - syncNumlockState(true); + } else { + if (cleanupDone) { + // If it's the first time we're in this loop after toggling the Numpad mode on + syncNumlockState(true); + cleanupDone = false; + } setKeyboardLEDColors(); - cleanupDone = false; - } return kaleidoscope::EventHandlerResult::OK; }