FastLED 3.9.15
Loading...
Searching...
No Matches

◆ CPixelView() [3/3]

template<class PIXEL_TYPE>
CPixelView< PIXEL_TYPE >::CPixelView ( PIXEL_TYPE * _leds,
int _start,
int _end )
inline

PixelSet constructor for the given set of LEDs, with start and end boundaries.

Note that start can be after end, resulting in a set that will iterate backwards

Parameters
_ledspointer to the raw LED data
_startthe start index of the LEDs for this array
_endthe end index of the LEDs for this array

Definition at line 90 of file pixelset.h.

90: dir(((_end-_start)<0) ? -1 : 1), len((_end - _start) + dir), leds(_leds + _start), end_pos(_leds + _start + len) {}
PIXEL_TYPE *const leds
pointer to the LED data
Definition pixelset.h:72
const int8_t dir
direction of the LED data, either 1 or -1. Determines how the pointer is incremented.
Definition pixelset.h:69
PIXEL_TYPE *const end_pos
pointer to the end position of the LED data
Definition pixelset.h:73
const int len
length of the LED data, in PIXEL_TYPE units.
Definition pixelset.h:70
Represents a set of LED objects.
Definition pixelset.h:67