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

◆ ensureBuffer()

template<typename CONTROLLER, EOrder RGB_ORDER = GRB>
void RGBWEmulatedController< CONTROLLER, RGB_ORDER >::ensureBuffer ( int32_t num_leds)
inlineprivate

Definition at line 214 of file chipsets.h.

214 {
215 if (num_leds != mNumRGBLeds) {
217 // The delegate controller expects the raw pixel byte data in multiples of 3.
218 // In the case of src data not a multiple of 3, then we need to
219 // add pad bytes so that the delegate controller doesn't walk off the end
220 // of the array and invoke a buffer overflow panic.
222 delete[] mRGBWPixels;
224 // showPixels may never clear the last two pixels.
225 for (uint32_t i = 0; i < new_size; i++) {
226 mRGBWPixels[i] = CRGB(0, 0, 0);
227 }
228
230 }
231 }
ControllerT mController
Definition chipsets.h:236
static uint32_t size_as_rgb(uint32_t num_of_rgbw_pixels)
Definition rgbw.h:39

References mController, mNumRGBLeds, mRGBWPixels, and Rgbw::size_as_rgb().

Referenced by showPixels().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: