FastLED 3.10.8
Loading...
Searching...
No Matches

◆ findSegmentById()

const WLEDSegment * fl::WLED::findSegmentById ( u8 id) const

Find segment by ID.

Parameters
idSegment ID to find
Returns
Pointer to segment if found, nullptr otherwise

Definition at line 551 of file wled.cpp.hpp.

551 {
552 for (const auto& seg : mSegments) {
553 if (seg.mId == id) {
554 return &seg;
555 }
556 }
557 return nullptr;
558}
fl::vector< WLEDSegment > mSegments
Definition wled.h:459

References fl::FL_NO_EXCEPT, and mSegments.