Skip to content

Commit

Permalink
Fix macro
Browse files Browse the repository at this point in the history
  • Loading branch information
DrA1ex committed Feb 1, 2024
1 parent ff7818a commit 25f29f4
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define D_WRITE(x) Serial.print(x)

#if DEBUG_LEVEL == __DEBUG_LEVEL_VERBOSE
#define VERBOSE(ARG) {ARG}
#define VERBOSE(ARG) (ARG)
#else
#define VERBOSE(ARG)
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/fx/enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "cctype"

enum class PaletteEnum : uint8_t {
ABYSS,
AQUA_BLOOM,
AQUA_MARINE,
AUTUMN_FIRE,
Expand All @@ -20,6 +21,7 @@ enum class PaletteEnum : uint8_t {
ELECTRIC_BLOOM,
EMERALD_OASIS,
ENCHANTED_WOODS,
ENIGMA,
ETHEREAL_EVOLUTION,
ETHEREAL_SERENADE,
FIERY_BLEND,
Expand All @@ -45,6 +47,7 @@ enum class PaletteEnum : uint8_t {
MYSTERICAL_SPECTRUM,
MYSTIC_MIDNIGHT,
NATURAL_BREEZE,
NEON_CANDY,
NEON_DREAMS,
NEON_SPECTRUM,
NIGHT_NOCTURNE,
Expand Down
3 changes: 3 additions & 0 deletions src/fx/fx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ColorEffectManager ColorEffects;
BrightnessEffectManager BrightnessEffects;

const std::initializer_list<PaletteEntry> palette_init = {
{PaletteEnum::ABYSS, "Abyss", Abyss_gp},
{PaletteEnum::AQUA_BLOOM, "Aqua Bloom", AquaBloom_gp},
{PaletteEnum::AQUA_MARINE, "Aqua Marine", AquaMarine_gp},
{PaletteEnum::AUTUMN_FIRE, "Autumn Fire", AutumnFire_gp},
Expand All @@ -23,6 +24,7 @@ const std::initializer_list<PaletteEntry> palette_init = {
{PaletteEnum::ELECTRIC_BLOOM, "Electric Bloom", ElectricBloom_gp},
{PaletteEnum::EMERALD_OASIS, "Emerald Oasis", EmeraldOasis_gp},
{PaletteEnum::ENCHANTED_WOODS, "Enchanted Woods", EnchantedForest_gp},
{PaletteEnum::ENIGMA, "Enigma", Enigma_gp},
{PaletteEnum::ETHEREAL_EVOLUTION, "Ethereal Evolution", EtherealEvolution_gp},
{PaletteEnum::ETHEREAL_SERENADE, "Ethereal Serenade", EtherealSerenade_gp},
{PaletteEnum::FIERY_BLEND, "Fiery Blend", FieryBlend_gp},
Expand All @@ -48,6 +50,7 @@ const std::initializer_list<PaletteEntry> palette_init = {
{PaletteEnum::MYSTERICAL_SPECTRUM, "Mystical Spectrum", MysticalSpectrum_gp},
{PaletteEnum::MYSTIC_MIDNIGHT, "Mystic Midnight", MysticMidnight_gp},
{PaletteEnum::NATURAL_BREEZE, "Natural Breeze", NaturalBreeze_gp},
{PaletteEnum::NEON_CANDY, "Neon Candy", NeonCandy_gp},
{PaletteEnum::NEON_DREAMS, "Neon Dreams", NeonDreams_gp},
{PaletteEnum::NEON_SPECTRUM, "Neon Spectrum", NeonSpectrum_gp},
{PaletteEnum::NIGHT_NOCTURNE, "Night Nocturne", NightNocturne_gp},
Expand Down
21 changes: 21 additions & 0 deletions src/fx/palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,3 +503,24 @@ const PaletteDataT AquaBloom_gp = {
0xe5f419, 0xe6dd18, 0xe7c616, 0xe8b014,
0xed9914, 0xf38314, 0xf96d14, 0xff5714
};

const PaletteDataT Enigma_gp = {
0x000000, 0x0d3600, 0x1a6d00, 0x26a300,
0x2dcf06, 0x20dd1f, 0x13eb38, 0x06f851,
0x00ff6b, 0x00ff86, 0x00ffa1, 0x00ffbc,
0x33ffcf, 0x77ffdf, 0xbbffef, 0xffffff
};

const PaletteDataT NeonCandy_gp = {
0x000000, 0x2a0036, 0x53006d, 0x7d00a3,
0xa300c9, 0xbd00be, 0xd700b2, 0xf200a7,
0xff0094, 0xff0079, 0xff005e, 0xff0043,
0xff3363, 0xff7797, 0xffbbcb, 0xffffff
};

const PaletteDataT Abyss_gp = {
0x000000, 0x00292d, 0x00535a, 0x007c86,
0x0099ae, 0x0090c5, 0x0088dc, 0x007ff3,
0x0071ff, 0x005cff, 0x0048ff, 0x0033ff,
0x3358ff, 0x7790ff, 0xbbc7ff, 0xffffff
};
5 changes: 4 additions & 1 deletion src/fx/palette.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,7 @@ extern const PaletteDataT WarmAmber_gp PROGMEM;
extern const PaletteDataT Limeade_gp PROGMEM;
extern const PaletteDataT NeonDreams_gp PROGMEM;
extern const PaletteDataT MagicPlum_gp PROGMEM;
extern const PaletteDataT AquaBloom_gp PROGMEM;
extern const PaletteDataT AquaBloom_gp PROGMEM;
extern const PaletteDataT Enigma_gp PROGMEM;
extern const PaletteDataT NeonCandy_gp PROGMEM;
extern const PaletteDataT Abyss_gp PROGMEM;
2 changes: 1 addition & 1 deletion src/sys_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "constants.h"

#if BUTTON == ENABLED
#define BUTTON_FN(x) {x}
#define BUTTON_FN(x) (x)
#else
#define BUTTON_FN(x)
#endif

0 comments on commit 25f29f4

Please sign in to comment.