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

◆ pixelCount()

fl::size fl::Corkscrew::pixelCount ( ) const

Definition at line 486 of file corkscrew.cpp.hpp.

486 {
487 // Use variant storage if available, otherwise fall back to legacy buffer size
488 if (!mPixelStorage.empty()) {
489 if (mPixelStorage.template is<fl::span<CRGB>>()) {
490 return mPixelStorage.template get<fl::span<CRGB>>().size();
491 } else if (mPixelStorage.template is<fl::vector_psram<CRGB>>()) {
492 return mPixelStorage.template get<fl::vector_psram<CRGB>>().size();
493 }
494 }
495
496 // Fall back to input size
497 return mNumLeds;
498}
fl::u16 mNumLeds
Definition corkscrew.h:223
PixelStorage mPixelStorage
Definition corkscrew.h:232
fl::size size() const
pair_element< I, T1, T2 >::type & get(pair< T1, T2 > &p) FL_NOEXCEPT
Definition pair.h:115

References fl::get(), mNumLeds, mPixelStorage, and size().

+ Here is the call graph for this function: