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 197 of file FastLED.cpp.

197 {
198 CLEDController *pCur = CLEDController::head();
199 while(x-- && pCur) {
200 pCur = pCur->next();
201 }
202 if(pCur == NULL) {
203 return *(CLEDController::head());
204 } else {
205 return *pCur;
206 }
207}
int x
Definition simple.h:92
CLEDController * next()
Get the next controller in the linked list after this one.
static CLEDController * head()
Get the first LED controller in the linked list of controllers.

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

+ Here is the call graph for this function: