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

◆ pixelCount()

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

Definition at line 486 of file corkscrew.cpp.

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<CRGB, fl::allocator_psram<CRGB>>>()) {
493 }
494 }
495
496 // Fall back to input size
497 return mNumLeds;
498}
fl::u16 mNumLeds
Definition corkscrew.h:230
PixelStorage mPixelStorage
Definition corkscrew.h:239
fl::size size() const
Slice< T > span
Definition span.h:8
pair_element< I, T1, T2 >::type & get(pair< T1, T2 > &p) noexcept
Definition pair.h:113
HeapVector< T, Allocator > vector
Definition vector.h:1214

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

+ Here is the call graph for this function: