FastLED 3.9.15
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 303 of file FastLED.cpp.hpp.

303 {
305 while(x-- && pCur) {
306 pCur = pCur->next();
307 }
308 if(pCur == nullptr) {
309 return *(CLEDController::head());
310 } else {
311 return *pCur;
312 }
313}
int x
Definition simple.h:92
CLEDController * next() FL_NOEXCEPT
Get the next controller in the linked list after this one.
static CLEDController * head() FL_NOEXCEPT
Get the first LED controller in the linked list of controllers.
fl::CLEDController CLEDController

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

+ Here is the call graph for this function: