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

◆ convertToLookUpTable()

void fl::XMap::convertToLookUpTable ( )

Definition at line 39 of file xmap.cpp.

39 {
40 if (type == kLookUpTable) {
41 return;
42 }
43 mLookUpTable.reset();
45 u16 *dataMutable = mLookUpTable->getDataMutable();
46 mData = mLookUpTable->getData();
47 for (u16 x = 0; x < length; x++) {
48 dataMutable[x] = mapToIndex(x);
49 }
51 xFunction = nullptr;
52}
int x
Definition simple.h:92
Type type
Definition xmap.h:62
u16 length
Definition xmap.h:61
u16 mapToIndex(u16 x) const
Definition xmap.cpp:54
fl::LUT16Ptr mLookUpTable
Definition xmap.h:65
const u16 * mData
Definition xmap.h:64
@ kLookUpTable
Definition xmap.h:30
XFunction xFunction
Definition xmap.h:63
shared_ptr< T > make_shared(Args &&... args)
Definition shared_ptr.h:348

References kLookUpTable, length, fl::make_shared(), mapToIndex(), mData, mLookUpTable, type, x, and xFunction.

+ Here is the call graph for this function: