56 heat.reset(
new uint8_t[num_leds]());
63 if (
leds ==
nullptr) {
68 for (uint16_t i = 0; i <
mNumLeds; i++) {
74 for (uint16_t k =
mNumLeds - 1; k >= 2; k--) {
85 for (uint16_t j = 0; j <
mNumLeds; j++) {
96 leds[pixelnumber] = color;
central include file for FastLED, defines the CFastLED class/object
RGB color palette with 16 discrete values.
void draw(DrawContext context) override
fl::scoped_array< uint8_t > heat
fl::Str fxName() const override
Fire2012(uint16_t num_leds, uint8_t cooling=55, uint8_t sparking=120, bool reverse_direction=false, const CRGBPalette16 &palette=(const CRGBPalette16 &) HeatColors_p)
#define FASTLED_SMART_PTR(type)
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.
const TProgmemRGBPalette16 HeatColors_p
Approximate "black body radiation" palette, akin to the FastLED HeatColor() function.
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 ...
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)