FastLED 3.10.8
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 FL_NO_EXCEPT
#define FL_DBG
Definition log.h:553
fl::string getAnimartrixName(int animation) FL_NO_EXCEPT
AnimartrixAnim

References FL_DBG, fl::FL_NO_EXCEPT, 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: