Further source code rearrangement

Moved all files but `LEDControl.c` and `LEDControl.h` to
`src/kaleidoscope/plugin/LEDControl`, to not pollute the `kaleidoscope/plugin`
directory needlessly, with headers that should not be explicitly included.

Also updated the documentation and the warnings emitted to make it clear that
the use of `LED-Off.h` and `LEDUtils.h` is deprecated in favour of just using
`<Kaleidoscope-LEDControl.h>`.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/365/head
Gergely Nagy 6 years ago
parent 142e828785
commit 0cfea03e34
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -7,13 +7,11 @@ effects.
## Upgrading ## Upgrading
The `LEDUtils.h` and `LED-Off.h` headers were moved, and need a The `LEDUtils.h` and `LED-Off.h` headers are now included by default when using
`kaleidoscope/plugin/` prefix now. The old headers still work, but are `<Kaleidoscope-LEDControl.h>`, and their explicit use is therefore deprecated.
deprecated, and will emit a warning. Both of them are included by The includes can be safely removed.
`<Kaleidoscope-LEDControl.h>` by default, so instead of migrating to the new
paths, one might wish to simply drop them instead.
The compatibility headers will be removed by 2019-01-14. Compatibility headers are in place for both, but will be removed by 2019-01-14.
Furthermore, to implement LED modes, one should use Furthermore, to implement LED modes, one should use
`kaleidoscope::plugin::LEDMode` as a base class now, instead of the former `kaleidoscope::plugin::LEDMode` as a base class now, instead of the former

@ -17,5 +17,5 @@
#pragma once #pragma once
#include <kaleidoscope/plugin/LEDControl.h> #include <kaleidoscope/plugin/LEDControl.h>
#include <kaleidoscope/plugin/LEDUtils.h> #include <kaleidoscope/plugin/LEDControl/LEDUtils.h>
#include <kaleidoscope/plugin/LED-Off.h> #include <kaleidoscope/plugin/LEDControl/LED-Off.h>

@ -16,6 +16,6 @@
#pragma once #pragma once
#warning Please migrate to including "kaleidoscope/plugin/LED-Off.h" instead of "LED-Off.h", or even consider dropping the include, because <Kaleidoscope-LEDControl.h> will pull the right header in anyway. #warning The "LED-Off.h" header is deprecated, the mode is included by default when using <Kaleidoscope-LEDControl.h>. It can be safely removed.
#include "kaleidoscope/plugin/LED-Off.h" #include "kaleidoscope/plugin/LEDControl/LED-Off.h"

@ -16,6 +16,6 @@
#pragma once #pragma once
#warning Please migrate to including "kaleidoscope/plugin/LEDUtils.h" instead of "LEDUtils.h", or even consider dropping the include, because <Kaleidoscope-LEDControl.h> will pull the right header in anyway. #warning The "LEDUtils.h" header is deprecated, the mode is included by default when using <Kaleidoscope-LEDControl.h>. It can be safely removed.
#include "kaleidoscope/plugin/LEDUtils.h" #include "kaleidoscope/plugin/LEDControl/LEDUtils.h"

@ -14,7 +14,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "kaleidoscope/plugin/BootAnimation.h" #include "kaleidoscope/plugin/LEDControl/BootAnimation.h"
#include "Kaleidoscope-LEDControl.h" #include "Kaleidoscope-LEDControl.h"
#ifdef ARDUINO_AVR_MODEL01 #ifdef ARDUINO_AVR_MODEL01

@ -14,7 +14,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "kaleidoscope/plugin/LED-Off.h" #include "kaleidoscope/plugin/LEDControl/LED-Off.h"
namespace kaleidoscope { namespace kaleidoscope {
namespace plugin { namespace plugin {

@ -14,7 +14,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "kaleidoscope/plugin/LEDUtils.h" #include "kaleidoscope/plugin/LEDControl/LEDUtils.h"
cRGB cRGB
breath_compute(uint8_t hue, uint8_t saturation) { breath_compute(uint8_t hue, uint8_t saturation) {
Loading…
Cancel
Save