MajicDesigns / MD_Parola

Library for modular scrolling LED matrix text displays
GNU Lesser General Public License v2.1
438 stars 135 forks source link

Suggestion for 3.5.2 #75

Closed sokigno closed 4 years ago

sokigno commented 4 years ago

displayAnimationTerminate is used to set a zone animation to the end of the current cycle. It is normally invoked before to call a new animation that as to start immediately.

MajicDesigns commented 4 years ago

How is that different from just doing a reset?

sokigno commented 4 years ago

How is that different from just doing a reset? Hi Marco, I'm updating the display when the animation is terminated. Sometime I had to stop the current animation and jump to a new one (e.g., alert message). Using reset function the animation was restarting blocking the display on a current one and avoiding to process the next status. The purpose of this function is to free the display and after use it for any other purpose (also using a different zone setup). Tony

MajicDesigns commented 4 years ago

Sorry, but I still don't think I see why you need this. I think this may be an issue specific to your situation and how you have structured the code.

If you have a new message to display (interrupted or otherwise), just load a new message, reset() and it all just works, or reset() and clear() and it all goes blank. If you don't want an animation to continue for whatever reason, use suspend() (to freeze) or just don't call animate().

As for the other, the pull request does not address regeneration of the documentation or the 2Speed the example, so I have changed it independently and that request is obsolete.

sokigno commented 4 years ago

Ok. Just to close this discussion, I checked my code and I figure out that I have to force the animation to END because I'm using displayAnimate to true in order to change state (new message). The easy way to force my loop to jump to a new state, so, was forcing displayAnimate true.

In any case I would congratulate with you because you did a wonderful job.