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

◆ showPixels()

template<uint8_t 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 1170 of file chipsets.h.

1170 {
1171 // Ensure buffer is large enough
1173
1174 // expand and copy all the pixels
1175 size_t out_index = 0;
1176 while (pixels.has(1)) {
1177 pixels.stepDithering();
1178
1179 uint16_t s0, s1, s2;
1180 pixels.loadAndScale_WS2816_HD(&s0, &s1, &s2);
1181 uint8_t b0_hi = s0 >> 8;
1182 uint8_t b0_lo = s0 & 0xFF;
1183 uint8_t b1_hi = s1 >> 8;
1184 uint8_t b1_lo = s1 & 0xFF;
1185 uint8_t b2_hi = s2 >> 8;
1186 uint8_t b2_lo = s2 & 0xFF;
1187
1189 mData[out_index + 1] = CRGB(b1_lo, b2_hi, b2_lo);
1190
1191 pixels.advanceData();
1192 out_index += 2;
1193 }
1194
1195 // ensure device controller won't modify color values
1196 mController.setCorrection(CRGB(255, 255, 255));
1197 mController.setTemperature(CRGB(255, 255, 255));
1198 mController.setDither(DISABLE_DITHER);
1199
1200 // output the data stream
1201 mController.setEnabled(true);
1202#ifdef BOUNCE_SUBCLASS
1203 mController.callShow(mData, 2 * pixels.size(), 255);
1204#else
1205 mController.show(mData, 2 * pixels.size(), 255);
1206#endif
1207 mController.setEnabled(false);
1208 }
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: