diff options
author | Brian Cully <bjc@kublai.com> | 2018-11-21 22:20:14 -0500 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2018-11-21 22:20:14 -0500 |
commit | 9e3dc09041aa5ef952033301f304a962da198f62 (patch) | |
tree | 9d9beb64cb3157c7523e0b18889b52eda023d43d | |
parent | 467f41325964aac147719fb53f21f965b4829057 (diff) | |
download | Kaleidoscope-LayerHighlighter-9e3dc09041aa5ef952033301f304a962da198f62.tar.gz Kaleidoscope-LayerHighlighter-9e3dc09041aa5ef952033301f304a962da198f62.zip |
Fix returning to previous LED mode when layer is toggled off.
-rw-r--r-- | src/Kaleidoscope-LayerHighlighter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Kaleidoscope-LayerHighlighter.cpp b/src/Kaleidoscope-LayerHighlighter.cpp index 30d0611..3ed56cb 100644 --- a/src/Kaleidoscope-LayerHighlighter.cpp +++ b/src/Kaleidoscope-LayerHighlighter.cpp @@ -9,8 +9,10 @@ kaleidoscope::EventHandlerResult LayerHighlighter::onSetup(void) { } kaleidoscope::EventHandlerResult LayerHighlighter::afterEachCycle() { - if (!Layer.isOn(layer)) + if (!Layer.isOn(layer)) { + LEDControl.set_mode(LEDControl.get_mode_index()); return kaleidoscope::EventHandlerResult::OK; + } LEDControl.set_mode(LEDControl.get_mode_index()); |