From 2cbf622e270ac5206c1ba1db838073e3c45efdb4 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 30 Aug 2018 09:40:22 -0400 Subject: Update README --- README.md | 47 ++++++++++++++++++++++++++++++++--- src/Kaleidoscope-LayerHighlighter.cpp | 3 ++- 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 + +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 -- cgit v1.2.3