WS2812FX icon indicating copy to clipboard operation
WS2812FX copied to clipboard

Any chance that we can count animations on specific segments?

Open StefanMeGit opened this issue 3 years ago • 1 comments

I tried to set all the segments to white via:

ws2812fx.setSegment(0, firstLED, lastLED, FX_MODE_STATIC, PURPLE, 500, NO_OPTIONS);

then a activate another segment to an animation:

ws2812fx.setSegment(1, firstLED, lastLED, FX_MODE_RAINBOW, COLORS, 500, NO_OPTIONS);

But ws2812fx.isCycle() counts for every segment including segment 1, which is active all the time... is it possible to just get information when segement 1 is finished the animation?

StefanMeGit avatar Jan 22 '22 10:01 StefanMeGit

The isCycle() function has two signatures:

bool WS2812FX::isCycle();
bool WS2812FX::isCycle(uint8_t seg);

You can use the second form and pass in the segment number to get the animation cycle status of a specific segment.

moose4lord avatar Jan 22 '22 13:01 moose4lord