Replaced single palette cases with an array to consolidate code

- all palettes are defined in palettes.h
- access to fastled palettes as an array to remove the switch cases
- palette createn in json.cpp in a loop instead of repeaded calls to save flash
This commit is contained in:
Damian Schneider
2024-11-10 22:39:52 +01:00
parent 271a07a7d6
commit d437027f26
3 changed files with 21 additions and 58 deletions

View File

@@ -844,6 +844,17 @@ const byte candy2_gp[] PROGMEM = {
211, 39, 33, 34,
255, 1, 1, 1};
// array of fastled palettes (palette 6 - 12)
const TProgmemRGBPalette16 *const fastledPalettes[] PROGMEM = {
&PartyColors_p, //06-00 Party
&CloudColors_p, //07-01 Cloud
&LavaColors_p, //08-02 Lava
&OceanColors_p, //09-03 Ocean
&ForestColors_p, //10-04 Forest
&RainbowColors_p, //11-05 Rainbow
&RainbowStripeColors_p //12-06 Rainbow Bands
};
// Single array of defined cpt-city color palettes.
// This will let us programmatically choose one based on
// a number, rather than having to activate each explicitly