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

◆ showPixels()

template<fl::u8 DATA_PIN, EOrder RGB_ORDER = GRB>
virtual void WS2816Controller< DATA_PIN, RGB_ORDER >::showPixels ( PixelController< RGB_ORDER, LANES, MASK > & pixels)
inlineoverridevirtual

Send the LED data to the strip.

Parameters
pixelsthe PixelController object for the LED data

Implements CPixelLEDController< GRB, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >.

Definition at line 1175 of file chipsets.h.

1175 {
1176 // Ensure buffer is large enough
1178
1179 // expand and copy all the pixels
1180 size_t out_index = 0;
1181 while (pixels.has(1)) {
1182 pixels.stepDithering();
1183
1184 fl::u16 s0, s1, s2;
1185 pixels.loadAndScale_WS2816_HD(&s0, &s1, &s2);
1186 fl::u8 b0_hi = s0 >> 8;
1187 fl::u8 b0_lo = s0 & 0xFF;
1188 fl::u8 b1_hi = s1 >> 8;
1189 fl::u8 b1_lo = s1 & 0xFF;
1190 fl::u8 b2_hi = s2 >> 8;
1191 fl::u8 b2_lo = s2 & 0xFF;
1192
1194 mData[out_index + 1] = CRGB(b1_lo, b2_hi, b2_lo);
1195
1196 pixels.advanceData();
1197 out_index += 2;
1198 }
1199
1200 // ensure device controller won't modify color values
1201 mController.setCorrection(CRGB(255, 255, 255));
1202 mController.setTemperature(CRGB(255, 255, 255));
1203 mController.setDither(DISABLE_DITHER);
1204
1205 // output the data stream
1206 mController.setEnabled(true);
1207#ifdef BOUNCE_SUBCLASS
1208 mController.callShow(mData, 2 * pixels.size(), 255);
1209#else
1210 mController.show(mData, 2 * pixels.size(), 255);
1211#endif
1212 mController.setEnabled(false);
1213 }
virtual int size()
How many LEDs does this controller manage?

References PixelController< RGB_ORDER, LANES, MASK >::advanceData(), DISABLE_DITHER, ensureBuffer(), PixelController< RGB_ORDER, LANES, MASK >::has(), PixelController< RGB_ORDER, LANES, MASK >::loadAndScale_WS2816_HD(), mController, mData, PixelController< RGB_ORDER, LANES, MASK >::size(), and PixelController< RGB_ORDER, LANES, MASK >::stepDithering().

+ Here is the call graph for this function: