FastLED 3.10.10
Loading...
Searching...
No Matches

◆ operator[]()

CLEDController & CFastLED::operator[] ( int x)

Get a reference to a registered controller.

Returns
a reference to the Nth controller

Definition at line 449 of file FastLED.cpp.hpp.

449 {
451 while(x-- && pCur) {
452 pCur = pCur->next();
453 }
454 if(pCur == nullptr) {
455 return *(CLEDController::head());
456 } else {
457 return *pCur;
458 }
459}
int x
Definition simple.h:92
static CLEDController * head() FL_NO_EXCEPT
Get the first LED controller in the linked list of controllers.
CLEDController * next() FL_NO_EXCEPT
Get the next controller in the linked list after this one.
fl::CLEDController CLEDController

References FL_NO_EXCEPT, fl::CLEDController::head(), fl::CLEDController::next(), and x.

+ Here is the call graph for this function: