Stop using deprecated interfaces

Use `Kaleidoscope.use`, `Kaleidoscope.useEventHandlerHook`, and
`Kaleidoscope.useLoopHook` instead of `USE_PLUGINS`, `event_handler_hook_use`,
and `loop_hook_use`, which are getting deprecated.

Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
pull/389/head
Gergely Nagy 7 years ago
parent 8556552d9b
commit f27a3a46ec

@ -48,17 +48,17 @@ static void leaderTX() {
Serial.println("leaderTX"); Serial.println("leaderTX");
} }
static const kaleidoscope::Leader::dictionary_t leader_dictionary PROGMEM = static const kaleidoscope::Leader::dictionary_t leader_dictionary PROGMEM =
LEADER_DICT({LEADER_SEQ(LEAD(0), Key_A), leaderA}, LEADER_DICT({LEADER_SEQ(LEAD(0), Key_A), leaderA},
{LEADER_SEQ(LEAD(0), Key_T, Key_X), leaderTX}); {LEADER_SEQ(LEAD(0), Key_T, Key_X), leaderTX});
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
USE_PLUGINS(&Leader); Kaleidoscope.use(&Leader);
Kaleidoscope.setup(); Kaleidoscope.setup();
Leader.dictionary = leader_dictionary; Leader.dictionary = leader_dictionary;
} }
``` ```

@ -51,7 +51,7 @@ LEADER_DICT({LEADER_SEQ(LEAD(0), Key_A), leaderTestA},
{LEADER_SEQ(LEAD(0), Key_A, Key_A), leaderTestAA}); {LEADER_SEQ(LEAD(0), Key_A, Key_A), leaderTestAA});
void setup() { void setup() {
USE_PLUGINS(&Leader); Kaleidoscope.use(&Leader);
Kaleidoscope.setup(); Kaleidoscope.setup();

@ -75,8 +75,8 @@ Leader::Leader(void) {
} }
void Leader::begin(void) { void Leader::begin(void) {
event_handler_hook_use(eventHandlerHook); Kaleidoscope.useEventHandlerHook(eventHandlerHook);
loop_hook_use(loopHook); Kaleidoscope.useLoopHook(loopHook);
} }
void Leader::reset(void) { void Leader::reset(void) {

Loading…
Cancel
Save