- Parameters
-
now | The current time in milliseconds. Fx writers are encouraged to use this instead of millis() directly as this will more deterministic behavior. |
Implements fl::Fx.
Definition at line 61 of file fire2012.h.
61 {
62 CRGB *
leds = context.leds;
63 if (
leds ==
nullptr) {
64 return;
65 }
66
67
68 for (uint16_t i = 0; i <
mNumLeds; i++) {
71 }
72
73
74 for (uint16_t k =
mNumLeds - 1; k >= 2; k--) {
76 }
77
78
82 }
83
84
85 for (uint16_t j = 0; j <
mNumLeds; j++) {
86
87
90 int pixelnumber;
93 } else {
94 pixelnumber = j;
95 }
96 leds[pixelnumber] = color;
97 }
98 }
fl::scoped_array< uint8_t > heat
LIB8STATIC_ALWAYS_INLINE uint8_t qadd8(uint8_t i, uint8_t j)
Add one byte to another, saturating at 0xFF.
LIB8STATIC_ALWAYS_INLINE uint8_t qsub8(uint8_t i, uint8_t j)
Subtract one byte from another, saturating at 0x00.
CRGB ColorFromPalette(const CRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType)
Get a color from a palette.
LIB8STATIC uint8_t random8()
Generate an 8-bit random number.
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
Scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
References ColorFromPalette(), cooling, heat, fl::_DrawContext::leds, leds, fl::Fx::mNumLeds, palette, qadd8(), qsub8(), random8(), reverse_direction, scale8(), sparking, and y.