Drop the V1 plugin API compatibility code

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 6 years ago
parent fb787d59ac
commit cc32e8e735

@ -198,28 +198,6 @@ void Heatmap::update(void) {
}
}
// Legacy V1 API
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void Heatmap::begin() {
Kaleidoscope.useEventHandlerHook(legacyEventHandler);
Kaleidoscope.useLoopHook(legacyLoopHook);
}
Key Heatmap::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) {
EventHandlerResult r = ::HeatmapEffect.onKeyswitchEvent(mapped_key, row, col, key_state);
if (r == EventHandlerResult::OK)
return mapped_key;
return Key_NoKey;
}
void Heatmap::legacyLoopHook(bool is_post_clear) {
if (is_post_clear)
return;
::HeatmapEffect.beforeEachCycle();
}
#endif
}
kaleidoscope::Heatmap HeatmapEffect;

@ -37,12 +37,6 @@ class Heatmap : public LEDMode {
protected:
void update(void) final;
#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API
void begin();
static Key legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state);
static void legacyLoopHook(bool is_post_clear);
#endif
private:
static uint16_t heatmap_[ROWS][COLS];
static uint16_t highest_;

Loading…
Cancel
Save