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

◆ addToList()

void CLEDController::addToList ( )

Add this controller to the linked list.

Note
Used with DeferRegister mode to explicitly add controller to list
Safe to call multiple times - won't add if already in list

Definition at line 34 of file cled_controller.cpp.hpp.

34 {
35 // Don't add if already in list
36 #if SKETCH_HAS_LARGE_MEMORY // Mostly for AVR, the isInList() check adds memory overhead on these tight platforms.
37 if (isInList()) {
38 return;
39 }
40 #endif
41
42 // Add to linked list
43 if(mPHead==nullptr) { mPHead = this; }
44 if(mPTail != nullptr) { mPTail->mPNext = this; }
45 mPTail = this;
46}
static CLEDController * mPTail
pointer to the last LED controller in the linked list
bool isInList() const FL_NOEXCEPT
Check if this controller is in the linked list.
static CLEDController * mPHead
pointer to the first LED controller in the linked list

References isInList(), mPHead, and mPTail.

Referenced by CLEDController(), CLEDController(), and fl::Channel::addToDrawList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: