- 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 60 of file fire2012.h.
60 {
61 CRGB *
leds = context.leds;
62 if (
leds ==
nullptr) {
63 return;
64 }
65
66
67 for (uint16_t i = 0; i <
mNumLeds; i++) {
70 }
71
72
73 for (uint16_t k =
mNumLeds - 1; k >= 2; k--) {
75 }
76
77
81 }
82
83
84 for (uint16_t j = 0; j <
mNumLeds; j++) {
85
86
89 int pixelnumber;
92 } else {
93 pixelnumber = j;
94 }
95 leds[pixelnumber] = color;
96 }
97 }
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.
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 ...
CRGB ColorFromPalette(const CRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType)
References fl::ColorFromPalette(), cooling, heat, fl::_DrawContext::leds, leds, fl::Fx::mNumLeds, palette, qadd8(), qsub8(), random8(), reverse_direction, scale8(), sparking, and y.