Created 3 different tasks with three different functions each in 20ms time period. But three tasks are not running simultaneously. One task created for updating chart, second task for updating numbers and 3rd task for updating numbers. all the priorities for the task also given same.
void function_task_cb(lv_task_t task)
{
graph_data = graph_data + rand()%100;
graph_data2 = graph_data2 + rand()%100;
lv_chart_set_next(fun1_chart,fun1_series,graph_data);
lv_chart_set_next(fun2_chart,fun2_series,graph_data2);
}
void function_task_cb_1(lv_task_t task)
{
lv_label_set_text_fmt(label_data4,"%d%",100);
lv_label_set_text_fmt(label_data5,"%d%", 250);
lv_label_set_text_fmt(label_data6,"%d%", 300);
}
void function_task_cb_2(lv_task_t task)
{
lv_label_set_text_fmt(label_data1,"%d%",25);
lv_label_set_text_fmt(label_data2,"%d%", 40);
lv_label_set_text_fmt(label_data3,"%d%", 15);
}
void fun_task(void)
{
lv_task_t* task = lv_task_create(function_task_cb,20,LV_TASK_PRIO_MID,NULL);
lv_task_t* task_1 = lv_task_create(function_task_cb_1,20,LV_TASK_PRIO_MID,NULL);
lv_task_t* task_2 = lv_task_create(function_task_cb_2,20,LV_TASK_PRIO_MID,NULL);
}