FastLED 3.10.8
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 175 of file pixel_controller.h.

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

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

+ Here is the caller graph for this function: