From c9d9b8e11708104526c31e371b860a8bcda54e8c Mon Sep 17 00:00:00 2001 From: Bruno Date: Sat, 1 Sep 2018 23:11:14 +0200 Subject: [PATCH] Fixed setAnimation bug --- src/AlaLedRgb.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AlaLedRgb.cpp b/src/AlaLedRgb.cpp index 89df5a8..d874128 100644 --- a/src/AlaLedRgb.cpp +++ b/src/AlaLedRgb.cpp @@ -118,6 +118,7 @@ void AlaLedRgb::setAnimation(int animation, long speed, AlaColor color) this->palette.colors = (AlaColor*)malloc(3); this->palette.colors[0] = color; + animSeqLen=0; setAnimationFunc(animation); animStartTime = millis(); } @@ -138,6 +139,7 @@ void AlaLedRgb::setAnimation(int animation, long speed, AlaPalette palette) this->speed = speed; this->palette = palette; + animSeqLen=0; setAnimationFunc(animation); animStartTime = millis(); }