FastLED 3.10.6
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 427 of file FastLED.cpp.hpp.

427 {
429 while(x-- && pCur) {
430 pCur = pCur->next();
431 }
432 if(pCur == nullptr) {
433 return *(CLEDController::head());
434 } else {
435 return *pCur;
436 }
437}
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::CLEDController::head(), fl::CLEDController::next(), and x.

+ Here is the call graph for this function: