Im testing a meter example that uses animation from uraich repo:
This file has been truncated.
import lvgl as lv
def set_value(indic, v):
# A simple meter
meter = lv.meter(lv.scr_act())
# Add a scale first
scale = meter.add_scale()
meter.set_scale_ticks(scale, 51, 2, 10, lv.palette_main(lv.PALETTE.GREY))
meter.set_scale_major_ticks(scale, 10, 4, 15, lv.color_black(), 10)
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:
04:00PM - 16 Mar 21 UTC
Almost every planned feature is implemented for v8. Now what we need the
… most is a lot of feedback about bugs and possible regressions.
v8 is available in the `master` branch of lvgl.
https://github.com/lvgl/lv_sim_eclipse_sdl/tree/dev is a ready-to-use project with v8. Note that the driver registration part slightly changed. The most important thing is that drivers `lv_indev_drv_t`, `lv_disp_drv_t` and `lv_fs_drv_t` needs to be `static`.
I suggest trying the demo widget first. It should work well on small (240x240) and very large (1280x720) screens.
The followings will be added soon:
- The `copy` parameter is not working yet in the `create` functions
- the mono theme
- updating the docs
- updating the MicroPython binding
In v8 there is an `examples` directory where you find a lot of examples for widgets, layouts, etc.
If you have minor remarks, feel free to comment here. For bigger issues please open a new issue.
Here is a teaser about the new widgets demo on 800x480:
Thank you very much if you test v8 and tell your experience :slightly_smiling_face:
Fixed on latest
lv_micropython dev-8 branch.
(dev-8 will be merged into “master” branch soon)
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
Something like this:
a = lv.anim_t()
... initialize a ...
running_anim = a.start()
Then later you can call: