aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Kaleidoscope-LayerHighlighter.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/Kaleidoscope-LayerHighlighter.cpp b/src/Kaleidoscope-LayerHighlighter.cpp
index 68c1984..ea05c68 100644
--- a/src/Kaleidoscope-LayerHighlighter.cpp
+++ b/src/Kaleidoscope-LayerHighlighter.cpp
@@ -5,8 +5,6 @@
#include <Kaleidoscope.h>
-byte LayerHighlighter::row = 255, LayerHighlighter::col = 255;
-
kaleidoscope::EventHandlerResult LayerHighlighter::onSetup(void) {
return kaleidoscope::EventHandlerResult::OK;
}
@@ -23,8 +21,8 @@ kaleidoscope::EventHandlerResult LayerHighlighter::afterEachCycle() {
Key layer_key = Layer.getKey(layer, r, c);
if (k == LockLayer(layer)) {
- row = r;
- col = c;
+ cRGB lock_color = breath_compute(lockHue);
+ LEDControl.setCrgbAt(r, c, lock_color);
}
if ((k != layer_key) || (k == Key_NoKey)) {
@@ -35,11 +33,5 @@ kaleidoscope::EventHandlerResult LayerHighlighter::afterEachCycle() {
}
}
- if (row > ROWS || col > COLS)
- return kaleidoscope::EventHandlerResult::OK;
-
- cRGB lock_color = breath_compute(lockHue);
- LEDControl.setCrgbAt(row, col, lock_color);
-
return kaleidoscope::EventHandlerResult::OK;
}