Rearrange the file layout in preparation of becoming a monorepo

Move the documentation to `doc/plugin/LEDEffects.md`, sources under
`src/kaleidoscope/plugin/` (appropriately namespaced). This is in preparation of
merging plugins into a single monorepo.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 6 years ago
parent 6c8bf9e99a
commit 046846c650
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -5,72 +5,4 @@
[travis:image]: https://travis-ci.org/keyboardio/Kaleidoscope-LEDEffects.svg?branch=master [travis:image]: https://travis-ci.org/keyboardio/Kaleidoscope-LEDEffects.svg?branch=master
[travis:status]: https://travis-ci.org/keyboardio/Kaleidoscope-LEDEffects [travis:status]: https://travis-ci.org/keyboardio/Kaleidoscope-LEDEffects
The `LEDEffects` plugin provides a selection of LED effects, each of them fairly See [doc/plugin/LEDEffects.md](doc/plugin/LEDEffects.md) for documentation.
simple, simple enough to not need a plugin of their own.
## Using the plugin
There are a number of different effects included in the package, all of them are
available once including the header, and one's free to choose any number of
them.
```c++
#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDEffects.h>
KALEIDOSCOPE_INIT_PLUGINS(LEDControl, JukeBoxEffect);
void setup(void) {
Kaleidoscope.setup();
}
```
## Included effects
All of these effects will scan the active layers, and apply effects based on
what keys are active on each position, thus, it needs no hints or configuration
to figure out our layout!
### `MiamiEffect`
Applies a color effect to the keyboard, inspired by the popular Miami keyset:
![Miami](extras/MiamiEffect.png)
Alphas, punctuation, numbers, the space bar, the numbers and the dot on the
keypad, and half the function keys will be in a cyan-ish color, the rest in
magenta.
### `JukeboxEffect`
Applies a color effect to the keyboard, inspired by the JukeBox keyset:
![Jukebox](extras/JukeboxEffect.png)
Alphas, punctuation, numbers, the space bar, the numbers and the dot on the
keypad, and half the function keys will be in a beige-ish color, the rest in
light green, except for the `Esc` key, which will be in red.
An alternative color scheme exists under the `JukeboxAlternateEffect` name,
where the light green and red colors are swapped.
## Plugin methods
The plugin provides a single method on each of the included effect objects:
### `.activate()`
> When called, immediately activates the effect. Mostly useful in the `setup()`
> method of the Sketch, or in macros that are meant to switch to the selected
> effect, no matter where we are in the list.
## Dependencies
* [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl)
## Further reading
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: https://github.com/keyboardio/Kaleidoscope-LEDEffects/blob/master/examples/LEDEffects/LEDEffects.ino

@ -0,0 +1,71 @@
# Kaleidoscope-LEDEffects
The `LEDEffects` plugin provides a selection of LED effects, each of them fairly
simple, simple enough to not need a plugin of their own.
## Using the plugin
There are a number of different effects included in the package, all of them are
available once including the header, and one's free to choose any number of
them.
```c++
#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDEffects.h>
KALEIDOSCOPE_INIT_PLUGINS(LEDControl, JukeBoxEffect);
void setup(void) {
Kaleidoscope.setup();
}
```
## Included effects
All of these effects will scan the active layers, and apply effects based on
what keys are active on each position, thus, it needs no hints or configuration
to figure out our layout!
### `MiamiEffect`
Applies a color effect to the keyboard, inspired by the popular Miami keyset:
![Miami](extras/MiamiEffect.png)
Alphas, punctuation, numbers, the space bar, the numbers and the dot on the
keypad, and half the function keys will be in a cyan-ish color, the rest in
magenta.
### `JukeboxEffect`
Applies a color effect to the keyboard, inspired by the JukeBox keyset:
![Jukebox](extras/JukeboxEffect.png)
Alphas, punctuation, numbers, the space bar, the numbers and the dot on the
keypad, and half the function keys will be in a beige-ish color, the rest in
light green, except for the `Esc` key, which will be in red.
An alternative color scheme exists under the `JukeboxAlternateEffect` name,
where the light green and red colors are swapped.
## Plugin methods
The plugin provides a single method on each of the included effect objects:
### `.activate()`
> When called, immediately activates the effect. Mostly useful in the `setup()`
> method of the Sketch, or in macros that are meant to switch to the selected
> effect, no matter where we are in the list.
## Dependencies
* [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl)
## Further reading
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: https://github.com/keyboardio/Kaleidoscope-LEDEffects/blob/master/examples/LEDEffects/LEDEffects.ino

@ -17,6 +17,6 @@
#pragma once #pragma once
#include <Kaleidoscope/TriColor.h> #include <kaleidoscope/plugin/TriColor.h>
#include <Kaleidoscope/Miami.h> #include <kaleidoscope/plugin/Miami.h>
#include <Kaleidoscope/Jukebox.h> #include <kaleidoscope/plugin/Jukebox.h>

@ -17,10 +17,10 @@
#include <Kaleidoscope-LEDEffects.h> #include <Kaleidoscope-LEDEffects.h>
kaleidoscope::TriColor JukeboxEffect(CRGB(0xc8, 0xe8, 0xee), /* TM */ kaleidoscope::plugin::TriColor JukeboxEffect(CRGB(0xc8, 0xe8, 0xee), /* TM */
CRGB(0xc3, 0xee, 0x8c), /* VCO */ CRGB(0xc3, 0xee, 0x8c), /* VCO */
CRGB(0x21, 0x38, 0xd7)); /* RN */ CRGB(0x21, 0x38, 0xd7)); /* RN */
kaleidoscope::TriColor JukeboxAlternateEffect(CRGB(0xc8, 0xe8, 0xee), /* TM */ kaleidoscope::plugin::TriColor JukeboxAlternateEffect(CRGB(0xc8, 0xe8, 0xee), /* TM */
CRGB(0x21, 0x38, 0xd7), /* RN */ CRGB(0x21, 0x38, 0xd7), /* RN */
CRGB(0xc3, 0xee, 0x8c)); /* VCO */ CRGB(0xc3, 0xee, 0x8c)); /* VCO */

@ -17,7 +17,7 @@
#pragma once #pragma once
#include <Kaleidoscope/TriColor.h> #include <kaleidoscope/plugin/TriColor.h>
extern kaleidoscope::TriColor JukeboxEffect; extern kaleidoscope::plugin::TriColor JukeboxEffect;
extern kaleidoscope::TriColor JukeboxAlternateEffect; extern kaleidoscope::plugin::TriColor JukeboxAlternateEffect;

@ -17,5 +17,5 @@
#include <Kaleidoscope-LEDEffects.h> #include <Kaleidoscope-LEDEffects.h>
kaleidoscope::TriColor MiamiEffect(CRGB(0x4e, 0xd6, 0xd6), /* Cyan */ kaleidoscope::plugin::TriColor MiamiEffect(CRGB(0x4e, 0xd6, 0xd6), /* Cyan */
CRGB(0xaf, 0x67, 0xfa)); /* Magenta */ CRGB(0xaf, 0x67, 0xfa)); /* Magenta */

@ -17,6 +17,6 @@
#pragma once #pragma once
#include <Kaleidoscope/TriColor.h> #include <kaleidoscope/plugin/TriColor.h>
extern kaleidoscope::TriColor MiamiEffect; extern kaleidoscope::plugin::TriColor MiamiEffect;

@ -18,6 +18,7 @@
#include <Kaleidoscope-LEDEffects.h> #include <Kaleidoscope-LEDEffects.h>
namespace kaleidoscope { namespace kaleidoscope {
namespace plugin {
TriColor::TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color) { TriColor::TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color) {
base_color_ = base_color; base_color_ = base_color;
@ -58,3 +59,4 @@ void TriColor::update(void) {
} }
} }
}

@ -21,6 +21,7 @@
#include <Kaleidoscope-LEDControl.h> #include <Kaleidoscope-LEDControl.h>
namespace kaleidoscope { namespace kaleidoscope {
namespace plugin {
class TriColor : public LEDMode { class TriColor : public LEDMode {
public: public:
TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color); TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color);
@ -35,3 +36,4 @@ class TriColor : public LEDMode {
cRGB esc_color_; cRGB esc_color_;
}; };
} }
}
Loading…
Cancel
Save