FastLED 3.10.9
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 445 of file FastLED.cpp.hpp.

445 {
447 while(x-- && pCur) {
448 pCur = pCur->next();
449 }
450 if(pCur == nullptr) {
451 return *(CLEDController::head());
452 } else {
453 return *pCur;
454 }
455}
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: