Rearrange the file layout in preparation of becoming a monorepo

Move the documentation to `doc/plugin/FingerPainter.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 5909c5732f
commit 90412ee1d5
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -5,63 +5,4 @@
[travis:image]: https://travis-ci.org/keyboardio/Kaleidoscope-FingerPainter.svg?branch=master
[travis:status]: https://travis-ci.org/keyboardio/Kaleidoscope-FingerPainter
The `FingerPainter` plugin provides an elaborate `LED` mode, in which one's able
to paint with their fingers: when edit mode is toggled on, keys will - instead
of performing their normal function - cycle through the global palette - as
provided by the [LED-Palette-Theme][plugin:l-p-t] plugin -, one by one for each tap.
This allows us to edit the theme with the keyboard only, without any special
software (except to toggle edit mode on and off).
## Using the plugin
To use the plugin, just include the header, add it to the list of used plugins.
```c++
#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LED-Palette-Theme.h>
#include <Kaleidoscope-EEPROM-Settings.h>
#include <Kaleidoscope-FingerPainter.h>
#include <Kaleidoscope-FocusSerial.h>
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,
EEPromSettings,
LEDPaletteTheme,
FingerPainter,
Focus);
void setup() {
Kaleidoscope.setup();
}
```
## Plugin methods
The plugin provides the `FingerPainter` object, which provides no public methods.
## Focus commands
### `fingerpainter.clear`
> Clears the canvas, so that one can start a new painting.
### `fingerpainter.toggle`
> Toggles the painting mode on and off.
## Dependencies
* [Kaleidoscope-EEPROM-Settings](https://github.com/keyboardio/Kaleidoscope-EEPROM-Settings)
* [Kaleidoscope-FocusSerial](https://github.com/keyboardio/Kaleidoscope-FocusSerial)
* [Kaleidoscope-LED-Palette-Theme][plugin:l-p-t]
* [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl)
[plugin:l-p-t]: https://github.com/keyboardio/Kaleidoscope-LED-Palette-Theme
## 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-FingerPainter/blob/master/examples/FingerPainter/FingerPainter.ino
See [doc/plugin/FingerPainter.md](doc/plugin/FingerPainter.md) for documentation.

@ -0,0 +1,62 @@
# Kaleidoscope-FingerPainter
The `FingerPainter` plugin provides an elaborate `LED` mode, in which one's able
to paint with their fingers: when edit mode is toggled on, keys will - instead
of performing their normal function - cycle through the global palette - as
provided by the [LED-Palette-Theme][plugin:l-p-t] plugin -, one by one for each tap.
This allows us to edit the theme with the keyboard only, without any special
software (except to toggle edit mode on and off).
## Using the plugin
To use the plugin, just include the header, add it to the list of used plugins.
```c++
#include <Kaleidoscope.h>
#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LED-Palette-Theme.h>
#include <Kaleidoscope-EEPROM-Settings.h>
#include <Kaleidoscope-FingerPainter.h>
#include <Kaleidoscope-FocusSerial.h>
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,
EEPromSettings,
LEDPaletteTheme,
FingerPainter,
Focus);
void setup() {
Kaleidoscope.setup();
}
```
## Plugin methods
The plugin provides the `FingerPainter` object, which provides no public methods.
## Focus commands
### `fingerpainter.clear`
> Clears the canvas, so that one can start a new painting.
### `fingerpainter.toggle`
> Toggles the painting mode on and off.
## Dependencies
* [Kaleidoscope-EEPROM-Settings](https://github.com/keyboardio/Kaleidoscope-EEPROM-Settings)
* [Kaleidoscope-FocusSerial](https://github.com/keyboardio/Kaleidoscope-FocusSerial)
* [Kaleidoscope-LED-Palette-Theme][plugin:l-p-t]
* [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl)
[plugin:l-p-t]: https://github.com/keyboardio/Kaleidoscope-LED-Palette-Theme
## 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-FingerPainter/blob/master/examples/FingerPainter/FingerPainter.ino

@ -17,4 +17,4 @@
#pragma once
#include <Kaleidoscope/FingerPainter.h>
#include <kaleidoscope/plugin/FingerPainter.h>

@ -23,6 +23,7 @@
#include <Kaleidoscope-LED-Palette-Theme.h>
namespace kaleidoscope {
namespace plugin {
uint16_t FingerPainter::color_base_;
bool FingerPainter::edit_mode_;
@ -110,6 +111,7 @@ EventHandlerResult FingerPainter::onFocusEvent(const char *command) {
return EventHandlerResult::OK;
}
}
}
kaleidoscope::FingerPainter FingerPainter;
kaleidoscope::plugin::FingerPainter FingerPainter;

@ -20,6 +20,7 @@
#include <Kaleidoscope-LEDControl.h>
namespace kaleidoscope {
namespace plugin {
class FingerPainter : public LEDMode {
public:
FingerPainter(void) {}
@ -38,6 +39,7 @@ class FingerPainter : public LEDMode {
static uint16_t color_base_;
static bool edit_mode_;
};
};
}
}
extern kaleidoscope::FingerPainter FingerPainter;
extern kaleidoscope::plugin::FingerPainter FingerPainter;
Loading…
Cancel
Save