9#include "fl/allocator.h"
13FASTLED_SMART_PTR(Frame);
23 explicit Frame(
int pixels_per_frame);
25 CRGB* rgb() {
return mRgb.get(); }
26 const CRGB* rgb()
const {
return mRgb.get(); }
27 size_t size()
const {
return mPixelsCount; }
28 void copy(
const Frame& other);
29 void interpolate(
const Frame& frame1,
const Frame& frame2, uint8_t amountOfFrame2);
30 static void interpolate(
const Frame& frame1,
const Frame& frame2, uint8_t amountofFrame2,
CRGB* pixels);
31 void draw(
CRGB* leds)
const;
33 const size_t mPixelsCount;
38inline void Frame::copy(
const Frame& other) {
39 memcpy(mRgb.get(), other.mRgb.get(), other.mPixelsCount *
sizeof(
CRGB));
Defines the red, green, and blue (RGB) pixel struct.
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)