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

175 {
176 CLEDController *pCur = CLEDController::head();
177 while(x-- && pCur) {
178 pCur = pCur->next();
179 }
180 if(pCur == NULL) {
181 return *(CLEDController::head());
182 } else {
183 return *pCur;
184 }
185}
int x
Definition Audio.ino:71
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: