Make the NumLock breathe's hue configurable too

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/365/head
Gergely Nagy 7 years ago
parent 4b04d506c4
commit 604ebc448d

@ -8,6 +8,7 @@ uint8_t NumPad_::numPadLayer;
bool NumPad_::cleanupDone = true; bool NumPad_::cleanupDone = true;
bool NumPad_::originalNumLockState = false; bool NumPad_::originalNumLockState = false;
cRGB NumPad_::color = CRGB(160, 0, 0); cRGB NumPad_::color = CRGB(160, 0, 0);
uint8_t NumPad_::lock_hue = 170;
kaleidoscope::EventHandlerResult NumPad_::onSetup(void) { kaleidoscope::EventHandlerResult NumPad_::onSetup(void) {
originalNumLockState = !!(kaleidoscope::hid::getKeyboardLEDs() & LED_NUM_LOCK); originalNumLockState = !!(kaleidoscope::hid::getKeyboardLEDs() & LED_NUM_LOCK);
@ -65,7 +66,7 @@ kaleidoscope::EventHandlerResult NumPad_::afterEachCycle() {
if (row > ROWS || col > COLS) if (row > ROWS || col > COLS)
return kaleidoscope::EventHandlerResult::OK; return kaleidoscope::EventHandlerResult::OK;
cRGB lock_color = breath_compute(); cRGB lock_color = breath_compute(lock_hue);
LEDControl.setCrgbAt(row, col, lock_color); LEDControl.setCrgbAt(row, col, lock_color);
return kaleidoscope::EventHandlerResult::OK; return kaleidoscope::EventHandlerResult::OK;

@ -10,6 +10,7 @@ class NumPad_ : public kaleidoscope::Plugin {
static uint8_t numPadLayer; static uint8_t numPadLayer;
static cRGB color; static cRGB color;
static uint8_t lock_hue;
kaleidoscope::EventHandlerResult onSetup(void); kaleidoscope::EventHandlerResult onSetup(void);
kaleidoscope::EventHandlerResult afterEachCycle(); kaleidoscope::EventHandlerResult afterEachCycle();

Loading…
Cancel
Save