From 71e2735fd33e50180b12d56e669b42809fbc82bf Mon Sep 17 00:00:00 2001 From: Evy Bongers Date: Sat, 4 May 2024 14:21:38 +0200 Subject: [PATCH] Clean up unneeded changes Signed-off-by: Evy Bongers --- .../src/kaleidoscope/plugin/DefaultPalette.h | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/DefaultPalette.h b/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/DefaultPalette.h index c3a32fb1c..7a25c48c1 100644 --- a/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/DefaultPalette.h +++ b/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/DefaultPalette.h @@ -19,9 +19,8 @@ #include // for PROGMEM -#include "kaleidoscope/device/device.h" // for cRGB, CRGB -#include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/LED-Palette-Theme.h" // for LEDPaletteTheme +#include "kaleidoscope/device/device.h" // for cRGB +#include "kaleidoscope/plugin.h" // for Plugin namespace kaleidoscope { namespace plugin { @@ -29,18 +28,6 @@ namespace plugin { namespace ledpalette { extern bool palette_defined; extern const cRGB palette[]; - -template -void configurePalette(cRGB const (&colors)[_color_count]) { - for (uint8_t i = 0; i < LEDPaletteTheme::getPaletteSize(); i++) { - if (i < _color_count) { - palette[i] = colors[i]; - } else { - palette[i] = CRGB(0x00, 0x00, 0x00); - } - } - bool palette_defined = true; -} } // namespace ledpalette class DefaultPalette : public Plugin { @@ -53,14 +40,14 @@ class DefaultPalette : public Plugin { // clang-format off -#define PALETTE(p00, p01, p02, p03, p04, p05, p06, p07, \ - p08, p09, p0a, p0b, p0c, p0d, p0e, ...) \ +#define PALETTE(p0, p1, p2, p3, p4, p5, p6, p7, \ + p8, p9, pa, pb, pc, pd, pe, ...) \ namespace kaleidoscope { \ namespace plugin { \ namespace ledpalette { \ const cRGB palette[] PROGMEM = { \ - p00, p01, p02, p03, p04, p05, p06, p07, \ - p08, p09, p0a, p0b, p0c, p0d, p0e, ##__VA_ARGS__ \ + p0, p1, p2, p3, p4, p5, p6, p7, \ + p8, p9, pa, pb, pc, pd, pe, ##__VA_ARGS__ \ }; \ bool palette_defined = true; \ } /* defaultcolormap */ \