From e97fed2d1f0e6a2c59eac108d3997d60da6b8084 Mon Sep 17 00:00:00 2001 From: Evy Bongers Date: Sun, 25 Feb 2024 17:35:05 +0100 Subject: [PATCH] Fix led mode names for TriColor effects Signed-off-by: Evy Bongers --- .../src/kaleidoscope/plugin/Jukebox.cpp | 6 ++++-- .../src/kaleidoscope/plugin/Miami.cpp | 3 ++- .../src/kaleidoscope/plugin/TriColor.cpp | 3 ++- .../src/kaleidoscope/plugin/TriColor.h | 11 ++++++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Jukebox.cpp b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Jukebox.cpp index 6ceddecb64..ba202da9c4 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Jukebox.cpp +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Jukebox.cpp @@ -20,10 +20,12 @@ #include "kaleidoscope/device/device.h" // for CRGB #include "kaleidoscope/plugin/TriColor.h" // for TriColor -kaleidoscope::plugin::TriColor JukeboxEffect(CRGB(0xc8, 0xe8, 0xee), /* TM */ +kaleidoscope::plugin::TriColor JukeboxEffect("Jukebox", + CRGB(0xc8, 0xe8, 0xee), /* TM */ CRGB(0xc3, 0xee, 0x8c), /* VCO */ CRGB(0x21, 0x38, 0xd7)); /* RN */ -kaleidoscope::plugin::TriColor JukeboxAlternateEffect(CRGB(0xc8, 0xe8, 0xee), /* TM */ +kaleidoscope::plugin::TriColor JukeboxAlternateEffect("JukeboxAlternate", + CRGB(0xc8, 0xe8, 0xee), /* TM */ CRGB(0x21, 0x38, 0xd7), /* RN */ CRGB(0xc3, 0xee, 0x8c)); /* VCO */ diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Miami.cpp b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Miami.cpp index 4d3799b186..f553a3803c 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Miami.cpp +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/Miami.cpp @@ -20,5 +20,6 @@ #include "kaleidoscope/device/device.h" // for CRGB #include "kaleidoscope/plugin/TriColor.h" // for TriColor -kaleidoscope::plugin::TriColor MiamiEffect(CRGB(0x4e, 0xd6, 0xd6), /* Cyan */ +kaleidoscope::plugin::TriColor MiamiEffect("Miami", + CRGB(0x4e, 0xd6, 0xd6), /* Cyan */ CRGB(0xaf, 0x67, 0xfa)); /* Magenta */ diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp index 324361bf8c..e67c907a2f 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp @@ -26,7 +26,8 @@ namespace kaleidoscope { namespace plugin { -TriColor::TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color) { +TriColor::TriColor(char *customName, cRGB base_color, cRGB mod_color, cRGB esc_color) { + ledModeName = customName; base_color_ = base_color; mod_color_ = mod_color; esc_color_ = esc_color; diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h index a73b265168..352e2f5a38 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.h @@ -27,12 +27,13 @@ namespace plugin { class TriColor : public Plugin, public LEDModeInterface { public: - TriColor() { ledModeName = "TriColor"; } - explicit TriColor(char *customName) { ledModeName = customName; } - - TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color); + TriColor(char *customName, cRGB base_color, cRGB mod_color, cRGB esc_color); + TriColor(cRGB base_color, cRGB mod_color, cRGB esc_color) + : TriColor("TriColor", base_color, mod_color, esc_color) {} + TriColor(char *customName, cRGB base_color, cRGB mod_color) + : TriColor(customName, base_color, mod_color, mod_color) {} TriColor(cRGB base_color, cRGB mod_color) - : TriColor(base_color, mod_color, mod_color) {} + : TriColor("TriColor", base_color, mod_color, mod_color) {} // This class' instance has dynamic lifetime //