FastLED 3.9.15
Loading...
Searching...
No Matches

◆ setNextFx()

bool fl::FxEngine::setNextFx ( int index,
uint16_t duration )

Sets the next effect to transition to.

Parameters
indexThe index of the effect to transition to.
durationThe duration of the transition in milliseconds.
Returns
True if the transition was set, false if the index was invalid.

Definition at line 46 of file fx_engine.cpp.

46 {
47 if (!mEffects.has(index)) {
48 return false;
49 }
50 mCurrId = index;
51 mDuration = duration;
52 mDurationSet = true;
53 return true;
54}
bool mDurationSet
Flag indicating if a new transition has been set.
Definition fx_engine.h:125
int mCurrId
Id of the current effect.
Definition fx_engine.h:123
IntFxMap mEffects
Collection of effects.
Definition fx_engine.h:121
uint16_t mDuration
Duration of the current transition.
Definition fx_engine.h:124

References mCurrId, mDuration, mDurationSet, and mEffects.

Referenced by nextFx().

+ Here is the caller graph for this function: