From 62c1672bf3e2f1d66100c69b3989f30d0d1ca76c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 17 Aug 2017 12:36:43 +0200 Subject: [PATCH] Stop using deprecated interfaces Use `Kaleidoscope.use`, `Kaleidoscope.useEventHandlerHook`, and `Kaleidoscope.useLoopHook` instead of the deprecated `USE_PLUGINS`, `event_handler_hook_use`, and `loop_hook_use` interfaces. Signed-off-by: Gergely Nagy --- README.md | 4 ++-- examples/ShapeShifter/ShapeShifter.ino | 2 +- src/Kaleidoscope/ShapeShifter.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 72e02ca4..99714885 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,10 @@ static const kaleidoscope::ShapeShifter::dictionary_t shape_shift_dictionary[] P }; void setup() { - USE_PLUGINS(&ShapeShifter); + Kaleidoscope.use(&ShapeShifter); Kaleidoscope.setup(); - + ShapeShifter.dictionary = shape_shift_dictionary; } ``` diff --git a/examples/ShapeShifter/ShapeShifter.ino b/examples/ShapeShifter/ShapeShifter.ino index bdb60e7c..8e8a12b1 100644 --- a/examples/ShapeShifter/ShapeShifter.ino +++ b/examples/ShapeShifter/ShapeShifter.ino @@ -46,7 +46,7 @@ static const kaleidoscope::ShapeShifter::dictionary_t shape_shift_dictionary[] P }; void setup() { - USE_PLUGINS(&ShapeShifter); + Kaleidoscope.use(&ShapeShifter); Kaleidoscope.setup(); diff --git a/src/Kaleidoscope/ShapeShifter.cpp b/src/Kaleidoscope/ShapeShifter.cpp index e2fe3dc8..6fedcc15 100644 --- a/src/Kaleidoscope/ShapeShifter.cpp +++ b/src/Kaleidoscope/ShapeShifter.cpp @@ -28,8 +28,8 @@ ShapeShifter::ShapeShifter(void) { } void ShapeShifter::begin(void) { - event_handler_hook_use(eventHandlerHook); - loop_hook_use(loopHook); + Kaleidoscope.useEventHandlerHook(eventHandlerHook); + Kaleidoscope.useLoopHook(loopHook); } void ShapeShifter::loopHook(bool is_post_clear) {