FastLED 3.10.6
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 174 of file pixel_controller.h.

174 {
175 int nOffset = 0;
176 for(int i = 0; i < LANES; ++i) {
177 mOffsets[i] = nOffset;
178 if((1<<i) & MASK) { nOffset += (len * mAdvance); }
179 }
180 }
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: