How to remove animations?

Im testing a meter example that uses animation from uraich repo:

When I run the script multiple times(reloading new clear screen) looks that previous animations still alive in the system.
I tried few things with lv.anim_del and a.custom_del functions but looks nothing works.
How can I stop/detach/delete the animation?

That’s a good question, thanks for bringing this up.
I think you found a problem.
I’ve added a related comment on GitHub:

Fixed on latest lv_micropython dev-8 branch.
(dev-8 will be merged into “master” branch soon)

For example:

running_anim = lv.anim_t.start(a)

Then you can stop animation like this:


Thank you for support.
I will update my repo and try test it tomorrow.

I updated my dev-8 branch with “git pull” command… But I after recomlipe I still see the problem: When I run twice the script, the meter start to jump randomly…
So maybe I need to do something more with git?? (Im not so experienced with such tools)

You also need to run git submodule update --recursive to update git submodules (such as LVGL).

Also, as explained above, you are not supposed to delete “a” like you are doing in your code, but the value returned from start.

Something like this:

a = lv.anim_t()
... initialize a ...
running_anim = a.start()

Then later you can call: