1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(example) minor fixes in lv_example_chart_2.py (#2601)

a few small bugfixes, demo works in simulator now
This commit is contained in:
Karijn Wessing 2021-09-27 11:07:24 +02:00 committed by GitHub
parent c45d9ccc3e
commit c7a49841bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,10 +45,10 @@ def draw_event_cb(e):
def add_data(timer):
# LV_UNUSED(timer);
cnt = 0;
char1.set_next_value(ser1, lv.rand(20, 90))
chart1.set_next_value(ser1, lv.rand(20, 90))
if cnt % 4 == 0:
chart1.set_next_value(ser2, lv_rand(40, 60))
chart1.set_next_value(ser2, lv.rand(40, 60))
cnt +=1
@ -73,5 +73,4 @@ for i in range(10):
chart1.set_next_value(ser1, lv.rand(20, 90))
chart1.set_next_value(ser2, lv.rand(30, 70))
# timer = lv.timer_t(add_data, 200, None)
timer = lv.timer_create(add_data, 200, None)