aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2018-08-30 09:40:22 -0400
committerBrian Cully <bjc@kublai.com>2018-08-30 09:40:22 -0400
commit2cbf622e270ac5206c1ba1db838073e3c45efdb4 (patch)
tree6bca85fb94b816300f0d18ba45508c6b566481d1
parent1313d9c623137dedd6772f85a5c3a7461193bf12 (diff)
downloadKaleidoscope-LayerHighlighter-2cbf622e270ac5206c1ba1db838073e3c45efdb4.tar.gz
Kaleidoscope-LayerHighlighter-2cbf622e270ac5206c1ba1db838073e3c45efdb4.zip
Update READMEv0.1.0
-rw-r--r--README.md47
-rw-r--r--src/Kaleidoscope-LayerHighlighter.cpp3
2 files changed, 46 insertions, 4 deletions
diff --git a/README.md b/README.md
index 7acabbe..68f8aab 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,48 @@
# Kaleidoscope-LayerHighlighter
-Highlight keys defined in a layer while it's locked.
+Highlight keys defined in a layer while it's locked with an LED
+effect.
-# CREDITS
+## Using the extension
+```c++
+#include <Kaleidoscope-LayerHighlighter.h>
+
+enum { PRIMARY, FUNCTION, NUMPAD, MYLAYER }; // layers
+
+/*
+ * Layer definitions, etc.,.
+ */
+
+LayerHighlighter myLayerHighlighter(MYLAYER);
+
+KALEIDOSCOPE_INIT_PLUGINS(myLayerHighlighter);
+
+void setup() {
+ Kaleidoscope.setup();
+
+ myLayerHighlighter.color = CRGB(160, 160, 0); // yellow
+ myLayerHighlighter.lockHue = 100; // green(ish)
+}
+```
+
+## Plugin methods
+
+Instances of this plugin provide the following instance variables:
+
+### construction
+
+Instantiate this plugin with the layer value to which it applies.
+
+### `.color`
+A CRGB value that specifies the color of the LEDs for keys defined
+within the layer.
+
+### `.lockHue`
+A color hue, normalized from 0-255, specifying the breathing LED color
+of any keys defined to lock the layer.
+
+## CREDITS
This was basically just a minor modification of the
-Kaleidoscope-NumPad library, by Jesse Vincent.
+[Kaleidoscope-NumPad][NumPad] library, by Jesse Vincent.
+
+[NumPad]: https://github.com/keyboardio/Kaleidoscope-NumPad
diff --git a/src/Kaleidoscope-LayerHighlighter.cpp b/src/Kaleidoscope-LayerHighlighter.cpp
index ea05c68..30b9db4 100644
--- a/src/Kaleidoscope-LayerHighlighter.cpp
+++ b/src/Kaleidoscope-LayerHighlighter.cpp
@@ -1,7 +1,8 @@
#include "Kaleidoscope-LayerHighlighter.h"
+
+#include "Kaleidoscope-LEDControl.h"
#include "LEDUtils.h"
#include "layers.h"
-#include "Kaleidoscope-LEDControl.h"
#include <Kaleidoscope.h>