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

◆ showPixels()

template<typename CONTROLLER, EOrder RGB_ORDER = GRB>
virtual void RGBWEmulatedController< CONTROLLER, 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, CONTROLLER::LANES_VALUE, CONTROLLER::MASK_VALUE >.

Definition at line 151 of file chipsets.h.

151 {
152 // Ensure buffer is large enough
154 Rgbw rgbw = this->getRgbw();
155 uint8_t *data = reinterpret_cast<uint8_t *>(mRGBWPixels);
156 while (pixels.has(1)) {
157 pixels.stepDithering();
158 pixels.loadAndScaleRGBW(rgbw, data, data + 1, data + 2, data + 3);
159 data += 4;
160 pixels.advanceData();
161 }
162
163 // Force the device controller to a state where it passes data through
164 // unmodified: color correction, color temperature, dither, and brightness
165 // (passed as an argument to show()). Temporarily enable the controller,
166 // show the LEDs, and disable it again.
167 //
168 // The device controller is in the global controller list, so if we
169 // don't keep it disabled, it will refresh again with unknown brightness,
170 // temperature, etc.
171
172 mController.setCorrection(CRGB(255, 255, 255));
173 mController.setTemperature(CRGB(255, 255, 255));
174 mController.setDither(DISABLE_DITHER);
175
176 mController.setEnabled(true);
178 mController.setEnabled(false);
179 }
virtual int size()
How many LEDs does this controller manage?
Rgbw getRgbw() const
ControllerT mController
Definition chipsets.h:210
void ensureBuffer(int32_t num_leds)
Definition chipsets.h:188

References PixelController< RGB_ORDER, LANES, MASK >::advanceData(), DISABLE_DITHER, ensureBuffer(), CLEDController::getRgbw(), PixelController< RGB_ORDER, LANES, MASK >::has(), PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleRGBW(), mController, mRGBWPixels, rgbw, PixelController< RGB_ORDER, LANES, MASK >::size(), Rgbw::size_as_rgb(), and PixelController< RGB_ORDER, LANES, MASK >::stepDithering().

+ Here is the call graph for this function: