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 177 of file chipsets.h.

177 {
178 // Ensure buffer is large enough
180 Rgbw rgbw = this->getRgbw();
182 while (pixels.has(1)) {
183 pixels.stepDithering();
184 pixels.loadAndScaleRGBW(rgbw, data, data + 1, data + 2, data + 3);
185 data += 4;
186 pixels.advanceData();
187 }
188
189 // Force the device controller to a state where it passes data through
190 // unmodified: color correction, color temperature, dither, and brightness
191 // (passed as an argument to show()). Temporarily enable the controller,
192 // show the LEDs, and disable it again.
193 //
194 // The device controller is in the global controller list, so if we
195 // don't keep it disabled, it will refresh again with unknown brightness,
196 // temperature, etc.
197
198 mController.setCorrection(CRGB(255, 255, 255));
199 mController.setTemperature(CRGB(255, 255, 255));
200 mController.setDither(DISABLE_DITHER);
201
202 mController.setEnabled(true);
204 mController.setEnabled(false);
205 }
virtual int size()
How many LEDs does this controller manage?
Rgbw getRgbw() const
ControllerT mController
Definition chipsets.h:236
void ensureBuffer(int32_t num_leds)
Definition chipsets.h:214
To * bit_cast_ptr(void *storage) noexcept
Definition bit_cast.h:54

References PixelController< RGB_ORDER, LANES, MASK >::advanceData(), fl::bit_cast_ptr(), 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: