85#define TWINKLE_SPEED 4
90#define TWINKLE_DENSITY 5
93#define SECONDS_PER_PALETTE 30
99#define AUTO_SELECT_BACKGROUND_COLOR 0
104#define COOL_LIKE_INCANDESCENT 1
153 }
else if (bglight > 16) {
162 for (u16 i = 0; i <
mNumLeds; i++) {
163 PRNG16 = (u16)(PRNG16 * 2053) + 1384;
164 u16 myclockoffset16 = PRNG16;
165 PRNG16 = (u16)(PRNG16 * 2053) + 1384;
166 u8 myspeedmultiplierQ5_3 =
167 ((((PRNG16 & 0xFF) >> 4) + (PRNG16 & 0x0F)) & 0x0F) + 0x08;
169 (fl::u32)((clock32 * myspeedmultiplierQ5_3) >> 3) +
171 u8 myunique8 = PRNG16 >> 8;
176 i16 deltabright = cbright - backgroundBrightness;
177 if (deltabright >= 32 || (!bg)) {
179 }
else if (deltabright > 0) {
189 u8 fastcycle8 = ticks;
190 u16 slowcycle16 = (ticks >> 8) + salt;
191 slowcycle16 += sin8(slowcycle16);
192 slowcycle16 = (slowcycle16 * 2053) + 1384;
193 u8 slowcycle8 = (slowcycle16 & 0xFF) + (slowcycle16 >> 8);
200 u8 hue = slowcycle8 - salt;
218 return 255 - (i + (i / 2));
226 u8 cooling = (phase - 128) >> 4;
227 c.g = qsub8(c.g, cooling);
228 c.b = qsub8(c.b, cooling * 2);
242 0x00580c, 0x00580c, 0x00580c, 0x00580c, 0x00580c, 0x00580c,
243 0x00580c, 0x00580c, 0x00580c, 0x00580c, 0x00580c, 0x00580c,
244 0x00580c, 0x00580c, 0x00580c, 0xB00402};
275 0x304048, 0x304048, 0x304048, 0x304048, 0x304048, 0x304048,
276 0x304048, 0x304048, 0x304048, 0x304048, 0x304048, 0x304048,
277 0x304048, 0x304048, 0x304048, 0xE0F0FF};
280 0xB80400, 0x902C02, 0xB80400, 0x902C02, 0x902C02, 0xB80400,
281 0x902C02, 0xB80400, 0x046002, 0x046002, 0x046002, 0x046002,
282 0x070758, 0x070758, 0x070758, 0x606820};
285 0x0C1040, 0x0C1040, 0x0C1040, 0x0C1040, 0x0C1040, 0x0C1040,
286 0x0C1040, 0x0C1040, 0x0C1040, 0x0C1040, 0x0C1040, 0x0C1040,
287 0x182080, 0x182080, 0x182080, 0x5080C0};
297 const u8 numberOfPalettes =
299 static u8 whichPalette = -1;
300 whichPalette = addmod8(whichPalette, 1, numberOfPalettes);
bool autoSelectBackgroundColor
u8 attackDecayWave8(u8 i)
fl::string fxName() const override
void chooseNextColorPalette(CRGBPalette16 &pal)
CRGBPalette16 currentPalette
void coolLikeIncandescentFunction(CRGB &c, u8 phase)
bool coolLikeIncandescent
void drawTwinkleFox(fl::span< CRGB > leds)
CRGBPalette16 targetPalette
void draw(DrawContext context) override
CRGB computeOneTwinkle(fl::u32 ms, u8 salt)
fl::u32 TProgmemRGBPalette16[16]
CRGBPalette16 entries stored in PROGMEM memory.
#define FL_PROGMEM
PROGMEM keyword for storage.
const TProgmemRGBPalette16 PartyColors_p
HSV color ramp: blue, purple, pink, red, orange, yellow (and back).
const TProgmemRGBPalette16 RainbowColors_p
HSV Rainbow.
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
const TProgmemRGBPalette16 * ActivePaletteList[]
const TProgmemRGBPalette16 Snow_p
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
const TProgmemRGBPalette16 RetroC9_p
const TProgmemRGBPalette16 BlueWhite_p
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
const TProgmemRGBPalette16 RedGreenWhite_p
const TProgmemRGBPalette16 RedWhite_p
const TProgmemRGBPalette16 Ice_p
const TProgmemRGBPalette16 FairyLight_p
void nblendPaletteTowardPalette(CRGBPalette16 ¤t, CRGBPalette16 &target, fl::u8 maxChanges)
const TProgmemRGBPalette16 Holly_p
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
constexpr CRGB nscale8_constexpr(const CRGB scaledown) const FL_NOEXCEPT
FASTLED_FORCE_INLINE u8 getAverageLight() const FL_NOEXCEPT
Get the average of the R, G, and B values.
@ FairyLight
<div style='background:#FFE42D;width:4em;height:4em;'></div>
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
@ Gray
<div style='background:#808080;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
FASTLED_FORCE_INLINE CRGB & nscale8_video(u8 scaledown) FL_NOEXCEPT
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
constexpr u32 as_uint32_t() const FL_NOEXCEPT
Representation of an 8-bit RGB pixel (Red, Green, Blue)
#define AUTO_SELECT_BACKGROUND_COLOR
#define COOL_LIKE_INCANDESCENT