From 6b42106f5a618e615719641f1e072a19c005f45d Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 20 Aug 2018 23:10:21 +0200 Subject: [PATCH] Drop the V1 plugin API compatibility code Signed-off-by: Gergely Nagy --- src/Kaleidoscope/AlphaSquare-Effect.cpp | 14 -------------- src/Kaleidoscope/AlphaSquare-Effect.h | 13 ------------- 2 files changed, 27 deletions(-) diff --git a/src/Kaleidoscope/AlphaSquare-Effect.cpp b/src/Kaleidoscope/AlphaSquare-Effect.cpp index 2c1446fd..c75a4dff 100644 --- a/src/Kaleidoscope/AlphaSquare-Effect.cpp +++ b/src/Kaleidoscope/AlphaSquare-Effect.cpp @@ -68,20 +68,6 @@ EventHandlerResult AlphaSquareEffect::onKeyswitchEvent(Key &mappedKey, byte row, return EventHandlerResult::OK; } -// Legacy V1 API -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API -void AlphaSquareEffect::setup(void) { - Kaleidoscope.useEventHandlerHook(legacyEventHandler); -} - -Key AlphaSquareEffect::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) { - EventHandlerResult r = ::AlphaSquareEffect.onKeyswitchEvent(mapped_key, row, col, key_state); - if (r == EventHandlerResult::OK) - return mapped_key; - return Key_NoKey; -} -#endif - } kaleidoscope::AlphaSquareEffect AlphaSquareEffect; diff --git a/src/Kaleidoscope/AlphaSquare-Effect.h b/src/Kaleidoscope/AlphaSquare-Effect.h index ff5bd386..24ebba73 100644 --- a/src/Kaleidoscope/AlphaSquare-Effect.h +++ b/src/Kaleidoscope/AlphaSquare-Effect.h @@ -30,22 +30,9 @@ class AlphaSquareEffect : public LEDMode { EventHandlerResult onKeyswitchEvent(Key &mappedKey, byte row, byte col, uint8_t keyState); -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API - kaleidoscope::EventHandlerResult onSetup() { - ::LEDControl.mode_add(this); - - return kaleidoscope::EventHandlerResult::OK; - } -#endif - protected: void update(void) final; -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API - void setup(void) final; - static Key legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state); -#endif - private: static uint32_t end_time_left_, end_time_right_; static Key last_key_left_, last_key_right_;