FastLED 3.10.8
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 441 of file FastLED.cpp.hpp.

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