| 19 | } |
| 20 | |
| 21 | fl::span<CRGB> FastLEDAdapter::getLEDs() { |
| 22 | CLEDController& controller = FastLED[mControllerIndex]; |
| 23 | CRGB* leds = controller.leds(); |
| 24 | if (!leds) { |
| 25 | return fl::span<CRGB>(); |
| 26 | } |
| 27 | |
| 28 | if (mHasSegment) { |
| 29 | return fl::span<CRGB>(leds + mSegmentStart, mSegmentEnd - mSegmentStart); |
| 30 | } |
| 31 | return fl::span<CRGB>(leds, controller.size()); |
| 32 | } |
| 33 | |
| 34 | size_t FastLEDAdapter::getNumLEDs() const { |
| 35 | if (mHasSegment) { |