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

◆ fxSet()

void fl::Animartrix::fxSet ( int fx)
inline

Definition at line 274 of file animartrix.hpp.

274 {
275 int curr = fxGet();
276 if (fx < 0) {
277 fx = curr + fx;
278 if (fx < 0) {
279 fx = static_cast<int>(AnimartrixAnim::NUM_ANIMATIONS) - 1;
280 }
281 }
282 fx = fx % static_cast<int>(AnimartrixAnim::NUM_ANIMATIONS);
283 mCurrentAnimation = static_cast<AnimartrixAnim>(fx);
284 FL_DBG("Setting animation to " << getAnimartrixName(static_cast<int>(mCurrentAnimation)));
285 }
AnimartrixAnim mCurrentAnimation
int fxGet() const
#define FL_DBG
Definition log.h:388
fl::string getAnimartrixName(int animation)
AnimartrixAnim

References FL_DBG, fxGet(), fl::getAnimartrixName(), mCurrentAnimation, and fl::NUM_ANIMATIONS.

Referenced by fxNext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: