Add Aurora Borealis effect (#1589)

* Added aurora effect

* Cosmetic changes prior to PR to match some guidelines

* Update FX.cpp

Moved mode_aurora function to end of FX.cpp

* Cosmetic changes prior to PR

- Changed new palette name to have a whitespace
- Undid changes to platformio.ini

* Removed commented out test palette

* Improved memory handling

Use SEGENV to allocate and manage dynamic memory needs of effect.
Only allocate as much memory as needed for current amount of waves set.

* Improvements to Aurora effect

- Smoother on low speed
- CRGB is trivially copiable
- Replaced Red & Blue mode
- Simplified logic and mem use a tiny bit
- Aurora2 palette a bit less yellowish

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
This commit is contained in:
Mazen
2021-01-04 11:11:36 +01:00
committed by GitHub
parent f5ed710c0b
commit af61962314
3 changed files with 166 additions and 17 deletions

View File

@@ -13,7 +13,7 @@
#ifndef PalettesWLED_h
#define PalettesWLED_h
#define GRADIENT_PALETTE_COUNT 42
#define GRADIENT_PALETTE_COUNT 43
const byte ib_jul01_gp[] PROGMEM = {
0, 194, 1, 1,
@@ -631,6 +631,14 @@ const byte temperature_gp[] PROGMEM = {
240, 80, 3, 3,
255, 80, 3, 3};
const byte Aurora2[] PROGMEM = {
0, 17, 177, 13, //Greenish
64, 121, 242, 5, //Greenish
128, 25, 173, 121, //Turquoise
192, 250, 77, 127, //Pink
255, 171, 101, 221 //Purple
};
// 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
@@ -677,7 +685,8 @@ const byte* const gGradientPalettes[] PROGMEM = {
Atlantica_gp, //51-38 Atlantica
C9_2_gp, //52-39 C9 2
C9_new_gp, //53-40 C9 New
temperature_gp //54-41 Temperature
temperature_gp, //54-41 Temperature
Aurora2 //55-42 Aurora 2
};
#endif