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

◆ initOffsets()

template<EOrder RGB_ORDER, int LANES = 1, fl::u32 MASK = 0xFFFFFFFF>
void PixelController< RGB_ORDER, LANES, MASK >::initOffsets ( int len)
inline

Initialize the PixelController::mOffsets array based on the length of the strip.

Parameters
lenthe number of LEDs in one lane of the strip

Definition at line 158 of file pixel_controller.h.

158 {
159 int nOffset = 0;
160 for(int i = 0; i < LANES; ++i) {
161 mOffsets[i] = nOffset;
162 if((1<<i) & MASK) { nOffset += (len * mAdvance); }
163 }
164 }
int mOffsets[LANES]
the number of bytes to offset each lane from the starting pointer
fl::i8 mAdvance
how many bytes to advance the pointer by each time. For CRGB this is 3.
Pixel controller class.

References mAdvance, and mOffsets.

Referenced by PixelController(), PixelController(), and PixelController().

+ Here is the caller graph for this function: