diff --git a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp index 826f8697da..1e136ece34 100644 --- a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp +++ b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp @@ -47,6 +47,10 @@ EventHandlerResult ColormapEffect::onNameQuery() { return ::Focus.sendName(F("ColormapEffect")); } +EventHandlerResult ColormapEffect::onLedEffectQuery() { + return ::Focus.sendName(F("ColormapEffect")); +} + bool ColormapEffect::isUninitialized() { return ::LEDPaletteTheme.isThemeUninitialized(map_base_, max_layers_); } diff --git a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h index 0b2869c9e6..8b170f3be3 100644 --- a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h +++ b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h @@ -37,6 +37,7 @@ class ColormapEffect : public Plugin, EventHandlerResult onLayerChange(); EventHandlerResult onNameQuery(); EventHandlerResult onFocusEvent(const char *input); + EventHandlerResult onLedEffectQuery(); static bool isUninitialized(); static void updateColorIndexAtPosition(uint8_t layer, uint16_t position, uint8_t palette_index); diff --git a/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp b/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp index 37ead72e67..b60e1a2f15 100644 --- a/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp +++ b/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp @@ -37,6 +37,10 @@ EventHandlerResult FingerPainter::onNameQuery() { return ::Focus.sendName(F("FingerPainter")); } +EventHandlerResult FingerPainter::onLedEffectQuery() { + return ::Focus.sendName(F("FingerPainterEffect")); +} + EventHandlerResult FingerPainter::onSetup() { color_base_ = ::LEDPaletteTheme.reserveThemes(1); return EventHandlerResult::OK; diff --git a/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.h b/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.h index fc287a974d..c88d2f8d74 100644 --- a/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.h +++ b/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.h @@ -38,7 +38,9 @@ class FingerPainter : public LEDMode { EventHandlerResult onKeyEvent(KeyEvent &event); EventHandlerResult onFocusEvent(const char *input); EventHandlerResult onSetup(); + EventHandlerResult onLedEffectQuery(); EventHandlerResult onNameQuery(); + EventHandlerResult onLedEffectQuery(); protected: void update() final; diff --git a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp index 4eb510ca76..bbf9359bb8 100644 --- a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp +++ b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp @@ -17,8 +17,9 @@ #include "kaleidoscope/plugin/Heatmap.h" -#include // for pgm_read_byte, PROGMEM -#include // for uint16_t, uint8_t, INT16_MAX +#include // for pgm_read_byte, PROGMEM +#include // for Focus +#include // for uint16_t, uint8_t, INT16_MAX #include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range, KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent @@ -44,6 +45,10 @@ uint16_t Heatmap::update_delay = 1000; uint16_t Heatmap::highest_ = 1; uint16_t Heatmap::heatmap_[]; +EventHandlerResult Heatmap::onLedEffectQuery() { + return ::Focus.sendName(F("HeatmapEffect")); +} + Heatmap::TransientLEDMode::TransientLEDMode(const Heatmap *parent) : // last heatmap computation time last_heatmap_comp_time_(Runtime.millisAtCycleStart()), diff --git a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h index 7f3f90a691..a84bc2b4f4 100644 --- a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h +++ b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h @@ -41,6 +41,7 @@ class Heatmap : public Plugin, void resetMap(); EventHandlerResult onKeyEvent(KeyEvent &event); + EventHandlerResult onLedEffectQuery(); EventHandlerResult beforeEachCycle(); // This class' instance has dynamic lifetime diff --git a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp index b97b4ad7f0..ab2ed2ac90 100644 --- a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp +++ b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp @@ -17,8 +17,9 @@ #include "kaleidoscope/plugin/LED-ActiveLayerColor.h" -#include // for pgm_read_byte -#include // for uint8_t +#include // for pgm_read_byte +#include // for Focus +#include // for uint8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ @@ -31,6 +32,10 @@ namespace plugin { const cRGB *LEDActiveLayerColorEffect::colormap_; +EventHandlerResult LEDActiveLayerColorEffect::onLedEffectQuery() { + return ::Focus.sendName(F("LEDActiveLayerColorEffect")); +} + LEDActiveLayerColorEffect::TransientLEDMode::TransientLEDMode( const LEDActiveLayerColorEffect *parent) : parent_(parent), diff --git a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h index 9ef51cbce7..5f6b3debbf 100644 --- a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h +++ b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h @@ -32,6 +32,7 @@ class LEDActiveLayerColorEffect : public Plugin, public AccessTransientLEDMode { public: EventHandlerResult onLayerChange(); + EventHandlerResult onLedEffectQuery(); void setColormap(const cRGB colormap[]); // This class' instance has dynamic lifetime diff --git a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp index e773f6ffd7..a24dc9e393 100644 --- a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp +++ b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp @@ -17,7 +17,8 @@ #include "kaleidoscope/plugin/LED-AlphaSquare/Effect.h" -#include // for uint16_t, uint8_t +#include // for Focus +#include // for uint16_t, uint8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent @@ -34,6 +35,10 @@ namespace plugin { uint16_t AlphaSquareEffect::length = 1000; +EventHandlerResult AlphaSquareEffect::onLedEffectQuery() { + return ::Focus.sendName(F("AlphaSquareEffect")); +} + AlphaSquareEffect::TransientLEDMode::TransientLEDMode(AlphaSquareEffect * /*parent*/) // NOLINT(readability/casting) : last_key_left_(Key_NoKey), last_key_right_(Key_NoKey) {} diff --git a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h index 0857a976f7..b8686835c6 100644 --- a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h +++ b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h @@ -37,6 +37,7 @@ class AlphaSquareEffect : public Plugin, static uint16_t length; EventHandlerResult onKeyEvent(KeyEvent &event); + EventHandlerResult onLedEffectQuery(); // This class' instance has dynamic lifetime // diff --git a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp index 5dd5618505..50d6677a33 100644 --- a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp +++ b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp @@ -17,8 +17,9 @@ #include "kaleidoscope/plugin/LED-Stalker.h" -#include // for min -#include // for uint8_t, uint16_t, uint32_t +#include // for min +#include // for Focus +#include // for uint8_t, uint16_t, uint32_t #include "kaleidoscope/KeyAddr.h" // for MatrixAddr, KeyAddr, MatrixAddr<>::... #include "kaleidoscope/KeyEvent.h" // for KeyEvent @@ -36,6 +37,10 @@ uint16_t StalkerEffect::step_length = 50; cRGB StalkerEffect::inactive_color = (cRGB){ 0, 0, 0}; +EventHandlerResult StalkerEffect::onLedEffectQuery() { + return ::Focus.sendName(F("StalkerEffect")); +} + StalkerEffect::TransientLEDMode::TransientLEDMode(const StalkerEffect *parent) : parent_(parent), step_start_time_(0), diff --git a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h index 77d1d9f9e8..a20d312733 100644 --- a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h +++ b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h @@ -46,6 +46,7 @@ class StalkerEffect : public Plugin, static cRGB inactive_color; EventHandlerResult onKeyEvent(KeyEvent &event); + EventHandlerResult onLedEffectQuery(); // This class' instance has dynamic lifetime // diff --git a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp index 1b55ed43aa..5f79a5e0fd 100644 --- a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp +++ b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp @@ -20,8 +20,9 @@ #include "kaleidoscope/plugin/LED-Wavepool.h" -#include // for pgm_read_byte, PROGMEM, abs -#include // for int8_t, uint8_t, int16_t, intptr_t +#include // for pgm_read_byte, PROGMEM, abs +#include // for Focus +#include // for int8_t, uint8_t, int16_t, intptr_t #include "kaleidoscope/KeyAddr.h" // for MatrixAddr, KeyAddr, MatrixAddr<>::... #include "kaleidoscope/KeyEvent.h" // for KeyEvent @@ -42,6 +43,10 @@ namespace plugin { uint16_t WavepoolEffect::idle_timeout = 5000; // 5 seconds int16_t WavepoolEffect::ripple_hue = WavepoolEffect::rainbow_hue; // automatic hue +EventHandlerResult WavepoolEffect::onLedEffectQuery() { + return ::Focus.sendName(F("WavepoolEffect")); +} + // map native keyboard coordinates (16x4) into geometric space (14x5) PROGMEM const uint8_t WavepoolEffect::TransientLEDMode::rc2pos[Runtime.device().numKeys()] = { // clang-format off diff --git a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h index d5749113fc..0df283557b 100644 --- a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h +++ b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h @@ -42,6 +42,7 @@ class WavepoolEffect : public Plugin, public AccessTransientLEDMode { public: EventHandlerResult onKeyEvent(KeyEvent &event); + EventHandlerResult onLedEffectQuery(); // ms before idle animation starts after last keypress static uint16_t idle_timeout; diff --git a/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.cpp b/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.cpp index 0cbaf3d8d0..8da9f55af6 100644 --- a/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.cpp +++ b/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.cpp @@ -16,7 +16,8 @@ #include "kaleidoscope/plugin/LEDEffect-Breathe.h" -#include // for uint8_t +#include // for Focus +#include // for uint8_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for cRGB @@ -25,6 +26,11 @@ namespace kaleidoscope { namespace plugin { + +EventHandlerResult LEDBreatheEffect::onLedEffectQuery() { + return ::Focus.sendName(F("LEDBreatheEffect")); +} + void LEDBreatheEffect::TransientLEDMode::update() { if (!Runtime.has_leds) return; diff --git a/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.h b/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.h index fee01ceda3..9f1c98d035 100644 --- a/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.h +++ b/plugins/Kaleidoscope-LEDEffect-Breathe/src/kaleidoscope/plugin/LEDEffect-Breathe.h @@ -30,6 +30,8 @@ class LEDBreatheEffect : public Plugin, uint8_t hue = 170; uint8_t saturation = 255; + EventHandlerResult onLedEffectQuery(); + // This class' instance has dynamic lifetime // class TransientLEDMode : public LEDMode { diff --git a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp index f071fbe8a0..bea38901b1 100644 --- a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp +++ b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp @@ -16,7 +16,8 @@ #include "kaleidoscope/plugin/LEDEffect-Chase.h" -#include // for uint16_t, uint8_t +#include // for Focus +#include // for uint16_t, uint8_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for CRGB, Device, Base<>::LEDRangeIterator @@ -25,6 +26,10 @@ namespace kaleidoscope { namespace plugin { +EventHandlerResult LEDChaseEffect::onLedEffectQuery() { + return ::Focus.sendName(F("LEDChaseEffect")); +} + void LEDChaseEffect::TransientLEDMode::update() { if (!Runtime.has_leds) return; diff --git a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h index 8ab77f4fbe..e7a572a8a4 100644 --- a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h +++ b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h @@ -28,6 +28,8 @@ namespace plugin { class LEDChaseEffect : public Plugin, public LEDModeInterface { public: + EventHandlerResult onLedEffectQuery(); + uint8_t update_delay() { return update_delay_; } diff --git a/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp b/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp index af07d9a7d2..83102ccc7c 100644 --- a/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp +++ b/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp @@ -16,8 +16,9 @@ #include "kaleidoscope/plugin/LEDEffect-Rainbow.h" -#include // for byte -#include // for uint8_t, uint16_t +#include // for byte +#include // for Focus +#include // for uint8_t, uint16_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for Base<>::LEDRangeIterator, Base<>::L... @@ -47,6 +48,10 @@ void LEDRainbowEffect::TransientLEDMode::update() { ::LEDControl.set_all_leds_to(rainbow); } +EventHandlerResult LEDRainbowEffect::onLedEffectQuery() { + return ::Focus.sendName(F("LEDRainbowEffect")); +} + void LEDRainbowEffect::brightness(byte brightness) { rainbow_value = brightness; } diff --git a/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.h b/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.h index b2495b595b..f330c9730b 100644 --- a/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.h +++ b/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.h @@ -27,6 +27,8 @@ namespace plugin { class LEDRainbowEffect : public Plugin, public LEDModeInterface { public: + EventHandlerResult onLedEffectQuery(); + void brightness(uint8_t); uint8_t brightness() { return rainbow_value; diff --git a/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.cpp b/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.cpp index 7107bfcd57..ad606e64f1 100644 --- a/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.cpp +++ b/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.cpp @@ -16,6 +16,8 @@ #include "kaleidoscope/plugin/LEDEffect-SolidColor.h" +#include // for Focus + #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/device/device.h" // for CRGB #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl @@ -23,6 +25,10 @@ namespace kaleidoscope { namespace plugin { +EventHandlerResult LEDSolidColor::onLedEffectQuery() { + return ::Focus.sendName(F("SolidColor")); +} + void LEDSolidColor::TransientLEDMode::onActivate() { ::LEDControl.set_all_leds_to(parent_->r_, parent_->g_, diff --git a/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.h b/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.h index 7ac5c39280..2f09c5d7d5 100644 --- a/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.h +++ b/plugins/Kaleidoscope-LEDEffect-SolidColor/src/kaleidoscope/plugin/LEDEffect-SolidColor.h @@ -28,6 +28,8 @@ namespace plugin { class LEDSolidColor : public Plugin, public LEDModeInterface { public: + EventHandlerResult onLedEffectQuery(); + LEDSolidColor(uint8_t r, uint8_t g, uint8_t b) : r_(r), g_(g), b_(b) {} diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp index 324361bf8c..5dea1b60cc 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp @@ -17,6 +17,8 @@ #include "kaleidoscope/plugin/TriColor.h" +#include // for Focus + #include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::Range #include "kaleidoscope/device/device.h" // for cRGB #include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_A, Key_Escape, Key_F1, Key_F12 @@ -26,6 +28,10 @@ namespace kaleidoscope { namespace plugin { +EventHandlerResult TriColor::onLedEffectQuery() { + return ::Focus.sendName(F("TriColor")); +} + TriColor::TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color) { base_color_ = base_color; mod_color_ = mod_color; diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h index 70da4c3949..9f4a5f05cf 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h @@ -27,6 +27,8 @@ namespace plugin { class TriColor : public Plugin, public LEDModeInterface { public: + EventHandlerResult onLedEffectQuery(); + TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color); TriColor(cRGB base_color, cRGB mod_color) : TriColor(base_color, mod_color, mod_color) {}