FastLED 3.10.8
Loading...
Searching...
No Matches
CRGBArray< SIZE > Class Template Reference

Detailed Description

template<int SIZE>
class CRGBArray< SIZE >

A version of CPixelView<CRGB> with an included array of CRGB LEDs.

Template Parameters
SIZEthe number of LEDs to include in the array
Examples
RGBSetDemo.ino, and TwinkleFox.ino.

Definition at line 502 of file pixelset.h.

#include <pixelset.h>

+ Inheritance diagram for CRGBArray< SIZE >:
+ Collaboration diagram for CRGBArray< SIZE >:

Public Member Functions

 CRGBArray () FL_NO_EXCEPT
 
const CRGB * get () const FL_NO_EXCEPT
 
CRGB * get () FL_NO_EXCEPT
 
 operator fl::span< const CRGB > () const FL_NO_EXCEPT
 
 operator fl::span< CRGB > () FL_NO_EXCEPT
 
CPixelView & operator= (const CPixelView &rhs) FL_NO_EXCEPT
 Copy the contents of the passed-in set to our set.
 
CPixelView & operator= (const PIXEL_TYPE &color) FL_NO_EXCEPT
 Assign the passed in color to all elements in this set.
 
size_t size () const FL_NO_EXCEPT
 
- Public Member Functions inherited from CPixelView< CRGB >
 CPixelView (const CPixelView &other) FL_NO_EXCEPT
 PixelSet copy constructor.
 
 CPixelView (const CPixelView &other) FL_NO_EXCEPT
 PixelSet copy constructor.
 
 CPixelView (CRGB *_leds, int _len) FL_NO_EXCEPT
 PixelSet constructor for a pixel set starting at the given PIXEL_TYPE* and going for _len leds.
 
 CPixelView (CRGB *_leds, int _len) FL_NO_EXCEPT
 PixelSet constructor for a pixel set starting at the given PIXEL_TYPE* and going for _len leds.
 
 CPixelView (CRGB *_leds, int _start, int _end) FL_NO_EXCEPT
 PixelSet constructor for the given set of LEDs, with start and end boundaries.
 
 CPixelView (CRGB *_leds, int _start, int _end) FL_NO_EXCEPT
 PixelSet constructor for the given set of LEDs, with start and end boundaries.
 
void dump () const FL_NO_EXCEPT
 Print debug data to serial, disabled for release.
 
void dump () const FL_NO_EXCEPT
 Print debug data to serial, disabled for release.
 
 operator bool () FL_NO_EXCEPT
 Returns whether or not any LEDs in this set are non-zero.
 
 operator bool () FL_NO_EXCEPT
 Returns whether or not any LEDs in this set are non-zero.
 
 operator CRGB * () const FL_NO_EXCEPT
 Return a pointer to the first element in this set.
 
 operator CRGB * () const FL_NO_EXCEPT
 Return a pointer to the first element in this set.
 
bool operator!= (const CPixelView &rhs) const FL_NO_EXCEPT
 Do these sets point to different things? Note that this is different from the contents of the set being the same.
 
bool operator!= (const CPixelView &rhs) const FL_NO_EXCEPT
 Do these sets point to different things? Note that this is different from the contents of the set being the same.
 
CPixelView operator() (int start, int end) FL_NO_EXCEPT
 Access an inclusive subset of the LEDs in this set.
 
CPixelView operator() (int start, int end) FL_NO_EXCEPT
 Access an inclusive subset of the LEDs in this set.
 
CPixelView operator- () FL_NO_EXCEPT
 Return the reverse ordering of this set.
 
CPixelView operator- () FL_NO_EXCEPT
 Return the reverse ordering of this set.
 
CPixelView & operator= (const CPixelView &rhs) FL_NO_EXCEPT
 Copy the contents of the passed-in set to our set.
 
CPixelView & operator= (const CPixelView &rhs) FL_NO_EXCEPT
 Copy the contents of the passed-in set to our set.
 
CPixelView & operator= (const CRGB &color) FL_NO_EXCEPT
 Assign the passed in color to all elements in this set.
 
CPixelView & operator= (const CRGB &color) FL_NO_EXCEPT
 Assign the passed in color to all elements in this set.
 
bool operator== (const CPixelView &rhs) const FL_NO_EXCEPT
 Do these sets point to the same thing? Note that this is different from the contents of the set being the same.
 
bool operator== (const CPixelView &rhs) const FL_NO_EXCEPT
 Do these sets point to the same thing? Note that this is different from the contents of the set being the same.
 
CRGB & operator[] (int x) const FL_NO_EXCEPT
 Access a single element in this set, just like an array operator.
 
CRGB & operator[] (int x) const FL_NO_EXCEPT
 Access a single element in this set, just like an array operator.
 
bool reversed () FL_NO_EXCEPT
 Whether or not this set goes backwards.
 
bool reversed () FL_NO_EXCEPT
 Whether or not this set goes backwards.
 
int size () const FL_NO_EXCEPT
 Get the size of this set.
 
int size () const FL_NO_EXCEPT
 Get the size of this set.
 
CPixelView & addToRGB (fl::u8 inc) FL_NO_EXCEPT
 Add the passed in value to all channels for all of the pixels in this set.
 
CPixelView & operator+= (CPixelView &rhs) FL_NO_EXCEPT
 Add every pixel in the other set to this set.
 
CPixelView & subFromRGB (fl::u8 inc) FL_NO_EXCEPT
 Subtract the passed in value from all channels for all of the pixels in this set.
 
CPixelView & operator-= (CPixelView &rhs) FL_NO_EXCEPT
 Subtract every pixel in the other set from this set.
 
CPixelView & operator++ () FL_NO_EXCEPT
 Increment every pixel value in this set.
 
CPixelView & operator++ (int DUMMY_ARG) FL_NO_EXCEPT
 Increment every pixel value in this set.
 
CPixelView & operator-- () FL_NO_EXCEPT
 Decrement every pixel value in this set.
 
CPixelView & operator-- (int DUMMY_ARG) FL_NO_EXCEPT
 Decrement every pixel value in this set.
 
CPixelView & operator/= (fl::u8 d) FL_NO_EXCEPT
 Divide every LED by the given value.
 
CPixelView & operator>>= (fl::u8 d) FL_NO_EXCEPT
 Shift every LED in this set right by the given number of bits.
 
CPixelView & operator*= (fl::u8 d) FL_NO_EXCEPT
 Multiply every LED in this set by the given value.
 
CPixelView & nscale8_video (fl::u8 scaledown) FL_NO_EXCEPT
 Scale every LED by the given scale.
 
CPixelView & operator%= (fl::u8 scaledown) FL_NO_EXCEPT
 Scale down every LED by the given scale.
 
CPixelView & fadeLightBy (fl::u8 fadefactor) FL_NO_EXCEPT
 Fade every LED down by the given scale.
 
CPixelView & nscale8 (fl::u8 scaledown) FL_NO_EXCEPT
 Scale every LED by the given scale.
 
CPixelView & nscale8 (CRGB &scaledown) FL_NO_EXCEPT
 Scale every LED by the given scale.
 
CPixelView & nscale8 (CPixelView &rhs) FL_NO_EXCEPT
 Scale every LED in this set by every led in the other set.
 
CPixelView & fadeToBlackBy (fl::u8 fade) FL_NO_EXCEPT
 Fade every LED down by the given scale.
 
CPixelView & operator|= (const CRGB &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE |= operator to every pixel in this set with the given PIXEL_TYPE value.
 
CPixelView & operator|= (const CPixelView &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE |= operator to every pixel in this set with every pixel in the passed in set.
 
CPixelView & operator|= (fl::u8 d) FL_NO_EXCEPT
 Apply the PIXEL_TYPE |= operator to every pixel in this set.
 
CPixelView & operator&= (const CRGB &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE &= operator to every pixel in this set with the given PIXEL_TYPE value.
 
CPixelView & operator&= (const CPixelView &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE &= operator to every pixel in this set with every pixel in the passed in set.
 
CPixelView & operator&= (fl::u8 d) FL_NO_EXCEPT
 Apply the PIXEL_TYPE &= operator to every pixel in this set with the passed in value.
 
CPixelView & addToRGB (fl::u8 inc) FL_NO_EXCEPT
 Add the passed in value to all channels for all of the pixels in this set.
 
CPixelView & operator+= (CPixelView &rhs) FL_NO_EXCEPT
 Add every pixel in the other set to this set.
 
CPixelView & subFromRGB (fl::u8 inc) FL_NO_EXCEPT
 Subtract the passed in value from all channels for all of the pixels in this set.
 
CPixelView & operator-= (CPixelView &rhs) FL_NO_EXCEPT
 Subtract every pixel in the other set from this set.
 
CPixelView & operator++ () FL_NO_EXCEPT
 Increment every pixel value in this set.
 
CPixelView & operator++ (int DUMMY_ARG) FL_NO_EXCEPT
 Increment every pixel value in this set.
 
CPixelView & operator-- () FL_NO_EXCEPT
 Decrement every pixel value in this set.
 
CPixelView & operator-- (int DUMMY_ARG) FL_NO_EXCEPT
 Decrement every pixel value in this set.
 
CPixelView & operator/= (fl::u8 d) FL_NO_EXCEPT
 Divide every LED by the given value.
 
CPixelView & operator>>= (fl::u8 d) FL_NO_EXCEPT
 Shift every LED in this set right by the given number of bits.
 
CPixelView & operator*= (fl::u8 d) FL_NO_EXCEPT
 Multiply every LED in this set by the given value.
 
CPixelView & nscale8_video (fl::u8 scaledown) FL_NO_EXCEPT
 Scale every LED by the given scale.
 
CPixelView & operator%= (fl::u8 scaledown) FL_NO_EXCEPT
 Scale down every LED by the given scale.
 
CPixelView & fadeLightBy (fl::u8 fadefactor) FL_NO_EXCEPT
 Fade every LED down by the given scale.
 
CPixelView & nscale8 (fl::u8 scaledown) FL_NO_EXCEPT
 Scale every LED by the given scale.
 
CPixelView & nscale8 (CRGB &scaledown) FL_NO_EXCEPT
 Scale every LED by the given scale.
 
CPixelView & nscale8 (CPixelView &rhs) FL_NO_EXCEPT
 Scale every LED in this set by every led in the other set.
 
CPixelView & fadeToBlackBy (fl::u8 fade) FL_NO_EXCEPT
 Fade every LED down by the given scale.
 
CPixelView & operator|= (const CRGB &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE |= operator to every pixel in this set with the given PIXEL_TYPE value.
 
CPixelView & operator|= (const CPixelView &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE |= operator to every pixel in this set with every pixel in the passed in set.
 
CPixelView & operator|= (fl::u8 d) FL_NO_EXCEPT
 Apply the PIXEL_TYPE |= operator to every pixel in this set.
 
CPixelView & operator&= (const CRGB &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE &= operator to every pixel in this set with the given PIXEL_TYPE value.
 
CPixelView & operator&= (const CPixelView &rhs) FL_NO_EXCEPT
 Apply the PIXEL_TYPE &= operator to every pixel in this set with every pixel in the passed in set.
 
CPixelView & operator&= (fl::u8 d) FL_NO_EXCEPT
 Apply the PIXEL_TYPE &= operator to every pixel in this set with the passed in value.
 
CPixelView & fill_solid (const CRGB &color) FL_NO_EXCEPT
 Fill all of the LEDs with a solid color.
 
CPixelView & fill_solid (const CHSV &color) FL_NO_EXCEPT
 Fill all of the LEDs with a solid color.
 
CPixelView & fill_rainbow (fl::u8 initialhue, fl::u8 deltahue=5) FL_NO_EXCEPT
 Fill all of the LEDs with a rainbow of colors.
 
CPixelView & fill_gradient (const CHSV &startcolor, const CHSV &endcolor, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth HSV gradient between two HSV colors.
 
CPixelView & fill_gradient (const CHSV &c1, const CHSV &c2, const CHSV &c3, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth HSV gradient between three HSV colors.
 
CPixelView & fill_gradient (const CHSV &c1, const CHSV &c2, const CHSV &c3, const CHSV &c4, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth HSV gradient between four HSV colors.
 
CPixelView & fill_gradient_RGB (const CRGB &startcolor, const CRGB &endcolor, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth RGB gradient between two RGB colors.
 
CPixelView & fill_gradient_RGB (const CRGB &c1, const CRGB &c2, const CRGB &c3) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth RGB gradient between three RGB colors.
 
CPixelView & fill_gradient_RGB (const CRGB &c1, const CRGB &c2, const CRGB &c3, const CRGB &c4) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth RGB gradient between four RGB colors.
 
CPixelView & nblend (const CRGB &overlay, fract8 amountOfOverlay) FL_NO_EXCEPT
 Destructively modifies all LEDs, blending in a given fraction of an overlay color.
 
CPixelView & nblend (const CPixelView &rhs, fract8 amountOfOverlay) FL_NO_EXCEPT
 Destructively blend another set of LEDs into this one.
 
CPixelView & blur1d (fract8 blur_amount) FL_NO_EXCEPT
 One-dimensional blur filter.
 
CPixelView & napplyGamma_video (float gamma) FL_NO_EXCEPT
 Destructively applies a gamma adjustment to all LEDs.
 
CPixelView & napplyGamma_video (float gammaR, float gammaG, float gammaB) FL_NO_EXCEPT
 Destructively applies a gamma adjustment to all LEDs.
 
CPixelView & fill_solid (const CRGB &color) FL_NO_EXCEPT
 Fill all of the LEDs with a solid color.
 
CPixelView & fill_solid (const CHSV &color) FL_NO_EXCEPT
 Fill all of the LEDs with a solid color.
 
CPixelView & fill_rainbow (fl::u8 initialhue, fl::u8 deltahue=5) FL_NO_EXCEPT
 Fill all of the LEDs with a rainbow of colors.
 
CPixelView & fill_gradient (const CHSV &startcolor, const CHSV &endcolor, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth HSV gradient between two HSV colors.
 
CPixelView & fill_gradient (const CHSV &c1, const CHSV &c2, const CHSV &c3, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth HSV gradient between three HSV colors.
 
CPixelView & fill_gradient (const CHSV &c1, const CHSV &c2, const CHSV &c3, const CHSV &c4, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth HSV gradient between four HSV colors.
 
CPixelView & fill_gradient_RGB (const CRGB &startcolor, const CRGB &endcolor, TGradientDirectionCode directionCode=fl::SHORTEST_HUES) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth RGB gradient between two RGB colors.
 
CPixelView & fill_gradient_RGB (const CRGB &c1, const CRGB &c2, const CRGB &c3) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth RGB gradient between three RGB colors.
 
CPixelView & fill_gradient_RGB (const CRGB &c1, const CRGB &c2, const CRGB &c3, const CRGB &c4) FL_NO_EXCEPT
 Fill all of the LEDs with a smooth RGB gradient between four RGB colors.
 
CPixelView & nblend (const CRGB &overlay, fract8 amountOfOverlay) FL_NO_EXCEPT
 Destructively modifies all LEDs, blending in a given fraction of an overlay color.
 
CPixelView & nblend (const CPixelView &rhs, fract8 amountOfOverlay) FL_NO_EXCEPT
 Destructively blend another set of LEDs into this one.
 
CPixelView & blur1d (fract8 blur_amount) FL_NO_EXCEPT
 One-dimensional blur filter.
 
CPixelView & napplyGamma_video (float gamma) FL_NO_EXCEPT
 Destructively applies a gamma adjustment to all LEDs.
 
CPixelView & napplyGamma_video (float gammaR, float gammaG, float gammaB) FL_NO_EXCEPT
 Destructively applies a gamma adjustment to all LEDs.
 
iterator begin () FL_NO_EXCEPT
 Makes an iterator instance for the start of the LED set.
 
iterator end () FL_NO_EXCEPT
 Makes an iterator instance for the end of the LED set.
 
iterator begin () const FL_NO_EXCEPT
 Makes an iterator instance for the start of the LED set, const qualified.
 
iterator end () const FL_NO_EXCEPT
 Makes an iterator instance for the end of the LED set, const qualified.
 
const_iterator cbegin () const FL_NO_EXCEPT
 Makes a const iterator instance for the start of the LED set, const qualified.
 
const_iterator cend () const FL_NO_EXCEPT
 Makes a const iterator instance for the end of the LED set, const qualified.
 
iterator begin () FL_NO_EXCEPT
 Makes an iterator instance for the start of the LED set.
 
iterator begin () const FL_NO_EXCEPT
 Makes an iterator instance for the start of the LED set, const qualified.
 
iterator end () FL_NO_EXCEPT
 Makes an iterator instance for the end of the LED set.
 
iterator end () const FL_NO_EXCEPT
 Makes an iterator instance for the end of the LED set, const qualified.
 
const_iterator cbegin () const FL_NO_EXCEPT
 Makes a const iterator instance for the start of the LED set, const qualified.
 
const_iterator cend () const FL_NO_EXCEPT
 Makes a const iterator instance for the end of the LED set, const qualified.
 

Private Attributes

CRGB rawleds [SIZE] = {0}
 the LED data
 

Additional Inherited Members

typedef pixelset_iterator_base< CRGB > iterator
 Iterator helper type for this class.
 
typedef pixelset_iterator_base< const CRGB > const_iterator
 Const iterator helper type for this class.
 
typedef pixelset_iterator_base< CRGB > iterator
 Iterator helper type for this class.
 
typedef pixelset_iterator_base< const CRGB > const_iterator
 Const iterator helper type for this class.
 
- Public Attributes inherited from CPixelView< CRGB >
const fl::i8 dir
 direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
 
const fl::i8 dir
 direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
 
CRGB *const end_pos
 pointer to the end position of the LED data
 
CRGB *const end_pos
 pointer to the end position of the LED data
 
CRGB *const leds
 pointer to the LED data
 
CRGB *const leds
 pointer to the LED data
 
const int len
 length of the LED data, in PIXEL_TYPE units.
 
const int len
 length of the LED data, in PIXEL_TYPE units.
 

The documentation for this class was generated from the following file: