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

◆ initOffsets()

template<EOrder RGB_ORDER, int LANES = 1, uint32_t 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 127 of file pixel_controller.h.

127 {
128 int nOffset = 0;
129 for(int i = 0; i < LANES; ++i) {
130 mOffsets[i] = nOffset;
131 if((1<<i) & MASK) { nOffset += (len * mAdvance); }
132 }
133 }
int8_t mAdvance
how many bytes to advance the pointer by each time. For CRGB this is 3.
int mOffsets[LANES]
the number of bytes to offset each lane from the starting pointer
Pixel controller class.

References mAdvance, and mOffsets.

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

+ Here is the caller graph for this function: