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

190 {
191 if (num_leds != mNumRGBLeds) {
193 // The delegate controller expects the raw pixel byte data in multiples of 3.
194 // In the case of src data not a multiple of 3, then we need to
195 // add pad bytes so that the delegate controller doesn't walk off the end
196 // of the array and invoke a buffer overflow panic.
198 delete[] mRGBWPixels;
200 // showPixels may never clear the last two pixels.
201 for (uint32_t i = 0; i < new_size; i++) {
202 mRGBWPixels[i] = CRGB(0, 0, 0);
203 }
204
206 }
207 }
ControllerT mController
Definition chipsets.h:212
static uint32_t size_as_rgb(uint32_t num_of_rgbw_pixels)
Definition rgbw.h:41

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: