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

188 {
189 if (num_leds != mNumRGBLeds) {
191 // The delegate controller expects the raw pixel byte data in multiples of 3.
192 // In the case of src data not a multiple of 3, then we need to
193 // add pad bytes so that the delegate controller doesn't walk off the end
194 // of the array and invoke a buffer overflow panic.
196 delete[] mRGBWPixels;
198 // showPixels may never clear the last two pixels.
199 for (uint32_t i = 0; i < new_size; i++) {
200 mRGBWPixels[i] = CRGB(0, 0, 0);
201 }
202
204 }
205 }
ControllerT mController
Definition chipsets.h:210
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: