不使用最新版本的lvgl
This commit is contained in:
@@ -17,9 +17,6 @@ lv_obj_t *label3 ; //lv_label_create(lv_screen_active()); /*Add a label to the b
|
||||
|
||||
void this_work_loop(){
|
||||
t++;
|
||||
//sprintf(str,"xxx:%lu",t);
|
||||
//lv_label_set_text(label3, str);
|
||||
//lv_obj_add_style(label3, &style_label, 0);
|
||||
lv_label_set_text_fmt(label3,"这是啥xxx:%d",t);
|
||||
|
||||
|
||||
@@ -59,10 +56,8 @@ void lv_example_get_started_1(void)
|
||||
lv_obj_center(label2);
|
||||
|
||||
label3=lv_label_create(lv_screen_active()); /*Add a label to the button*/
|
||||
|
||||
//lv_label_set_text(label3, "xxx:"); /*Set the labels text*/
|
||||
lv_obj_set_pos(label3, 200, 150);
|
||||
|
||||
lv_obj_add_style(label3, &style_label, 0);
|
||||
lv_label_set_text_fmt(label3,"这是xxx:%d",t);
|
||||
lv_timer_create(this_work_loop, 1000, NULL);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef LV_HELLOWORLD_H
|
||||
#define LV_HELLOWORLD_H
|
||||
|
||||
#include "lvgl.h"
|
||||
#include "lvgl/lvgl.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
void lv_example_get_started_1(void);
|
||||
|
||||
Reference in New Issue
Block a user