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

181 {
182 CLEDController *pCur = CLEDController::head();
183 while(x-- && pCur) {
184 pCur = pCur->next();
185 }
186 if(pCur == NULL) {
187 return *(CLEDController::head());
188 } else {
189 return *pCur;
190 }
191}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
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: