place some lv_log_add calls

This commit is contained in:
Gabor Kiss-Vamosi
2018-07-25 17:57:08 +02:00
parent 2d8b3b2b6e
commit 69434c8b7d
39 changed files with 354 additions and 29 deletions

View File

@@ -253,6 +253,11 @@ static void indev_proc_task(void * param)
{ {
(void)param; (void)param;
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_DEBUG, __FILE__, __LINE__, "indev_proc task started");
#endif
lv_indev_data_t data; lv_indev_data_t data;
lv_indev_t * i; lv_indev_t * i;
i = lv_indev_next(NULL); i = lv_indev_next(NULL);
@@ -291,6 +296,10 @@ static void indev_proc_task(void * param)
} }
indev_act = NULL; /*End of indev processing, so no act indev*/ indev_act = NULL; /*End of indev processing, so no act indev*/
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_DEBUG, __FILE__, __LINE__, "indev_proc task finished");
#endif
} }

View File

@@ -167,6 +167,9 @@ void lv_refr_pop_from_buf(uint16_t num)
static void lv_refr_task(void * param) static void lv_refr_task(void * param)
{ {
(void)param; (void)param;
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_DEBUG, __FILE__, __LINE__, "display refresh task started");
#endif
uint32_t start = lv_tick_get(); uint32_t start = lv_tick_get();
@@ -186,6 +189,9 @@ static void lv_refr_task(void * param)
monitor_cb(lv_tick_elaps(start), px_num); monitor_cb(lv_tick_elaps(start), px_num);
} }
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_DEBUG, __FILE__, __LINE__, "display refresh task finished");
#endif
} }

View File

@@ -13,6 +13,7 @@
#include "../lv_misc/lv_area.h" #include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h" #include "../lv_misc/lv_font.h"
#include "../lv_misc/lv_color.h" #include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_log.h"
#if LV_VDB_SIZE != 0 #if LV_VDB_SIZE != 0
@@ -215,7 +216,12 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
204, 221, 238, 255 204, 221, 238, 255
}; };
if(font_p == NULL) return; if(font_p == NULL) {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Font: character's bitmap not found");
#endif
return;
}
lv_coord_t pos_x = pos_p->x; lv_coord_t pos_x = pos_p->x;

View File

@@ -148,7 +148,22 @@ void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t col
void lv_disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p) void lv_disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p)
{ {
if(active == NULL) return; if(active == NULL) return;
if(active->driver.disp_flush != NULL) active->driver.disp_flush(x1, y1, x2, y2, color_p); if(active->driver.disp_flush != NULL) {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Disp. flush called");
#endif
active->driver.disp_flush(x1, y1, x2, y2, color_p);
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Disp. flush finished");
#endif
} else {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Disp. flush: function not set");
#endif
}
} }
/** /**

View File

@@ -111,8 +111,17 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
if(indev->driver.read) { if(indev->driver.read) {
data->user_data = indev->driver.user_data; data->user_data = indev->driver.user_data;
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Indev read called");
#endif
cont = indev->driver.read(data); cont = indev->driver.read(data);
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Indev read finished");
#endif
} else { } else {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Indev read: function not set");
#endif
memset(data, 0, sizeof(lv_indev_data_t)); memset(data, 0, sizeof(lv_indev_data_t));
} }

View File

@@ -62,6 +62,7 @@ void lv_anim_init(void)
*/ */
void lv_anim_create(lv_anim_t * anim_p) void lv_anim_create(lv_anim_t * anim_p)
{ {
/* Do not let two animations for the same 'var' with the same 'fp'*/ /* Do not let two animations for the same 'var' with the same 'fp'*/
if(anim_p->fp != NULL) lv_anim_del(anim_p->var, anim_p->fp); /*fp == NULL would delete all animations of var*/ if(anim_p->fp != NULL) lv_anim_del(anim_p->var, anim_p->fp); /*fp == NULL would delete all animations of var*/
@@ -80,6 +81,11 @@ void lv_anim_create(lv_anim_t * anim_p)
/* Creating an animation changed the linked list. /* Creating an animation changed the linked list.
* It's important if it happens in a ready callback. (see `anim_task`)*/ * It's important if it happens in a ready callback. (see `anim_task`)*/
anim_list_changed = true; anim_list_changed = true;
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Animation created");
#endif
} }
/** /**

View File

@@ -8,6 +8,7 @@
*********************/ *********************/
#include <stddef.h> #include <stddef.h>
#include "lv_font.h" #include "lv_font.h"
#include "lv_log.h"
/********************* /*********************
* DEFINES * DEFINES
@@ -103,6 +104,9 @@ const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter)
font_i = font_i->next_page; font_i = font_i->next_page;
} }
#if USE_LV_LOG
if(letter >= ' ') lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Font: glyph not found");
#endif
return NULL; return NULL;
} }
@@ -128,7 +132,11 @@ uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter)
font_i = font_i->next_page; font_i = font_i->next_page;
} }
#if USE_LV_LOG
if(letter >= ' ') lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Font: character's width not found");
#endif
return 0; return 0;
} }
/** /**
@@ -148,6 +156,9 @@ uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter)
font_i = font_i->next_page; font_i = font_i->next_page;
} }
#if USE_LV_LOG
if(letter >= ' ') lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Font: character's width not found");
#endif
return 0; return 0;
} }
@@ -167,6 +178,9 @@ uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter)
font_i = font_i->next_page; font_i = font_i->next_page;
} }
#if USE_LV_LOG
if(letter >= ' ') lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Font: character's bpp not found");
#endif
return 0; return 0;
} }

View File

@@ -58,15 +58,11 @@ void lv_log_add(lv_log_level_t level, const char * file, uint32_t line, const ch
{ {
if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/ if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/
if((level == LV_LOG_LEVEL_INFO && LV_LOG_INFO) || if(level >= LV_LOG_LEVEL) {
(level == LV_LOG_LEVEL_WARN && LV_LOG_WARN) ||
(level == LV_LOG_LEVEL_ERROR && LV_LOG_ERROR) ||
(level == LV_LOG_LEVEL_USER && LV_LOG_USER))
{
#if LV_LOG_PRINTF #if LV_LOG_PRINTF
static const char * lvl_prefix[] = {"Info", "Warn", "Error", "User"}; static const char * lvl_prefix[] = {"Debug", "Trace", "Info", "Warn", "Error"};
printf("%s %s:%d: %s\n", lvl_prefix[level], file, line, dsc); printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line);
#else #else
if(print_cb) print_cb(level, file, line, dsc); if(print_cb) print_cb(level, file, line, dsc);
#endif #endif

View File

@@ -27,10 +27,11 @@ extern "C" {
/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/ /*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/
typedef enum typedef enum
{ {
LV_LOG_LEVEL_INFO = 0, LV_LOG_LEVEL_DEBUG = 0, /*A lot of logs to show every detail*/
LV_LOG_LEVEL_WARN, LV_LOG_LEVEL_TRACE, /*Trace the most important calls*/
LV_LOG_LEVEL_ERROR, LV_LOG_LEVEL_INFO, /*Log important events*/
LV_LOG_LEVEL_USER, LV_LOG_LEVEL_WARN, /*Log if something unwanted happened but didn't caused problem*/
LV_LOG_LEVEL_ERROR, /*Only critical issue, when the system may fail*/
_LV_LOG_LEVEL_NUM _LV_LOG_LEVEL_NUM
}lv_log_level_t; }lv_log_level_t;

View File

@@ -159,6 +159,9 @@ void * lv_mem_alloc(uint32_t size)
} }
#endif #endif
#if USE_LV_LOG
if(alloc == NULL) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Couldn't allocate memory");
#endif
return alloc; return alloc;
} }
@@ -241,6 +244,10 @@ void * lv_mem_realloc(void * data_p, uint32_t new_size)
} }
} }
#if USE_LV_LOG
if(new_p == NULL) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, "Couldn't allocate memory");
#endif
return new_p; return new_p;
} }

View File

@@ -22,6 +22,7 @@ extern "C" {
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include "lv_log.h"
/********************* /*********************
* DEFINES * DEFINES
@@ -93,22 +94,20 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p);
*/ */
uint32_t lv_mem_get_size(const void * data); uint32_t lv_mem_get_size(const void * data);
/**
* Halt o NULL pointer
* p pointer to a memory
*/
static inline void lv_mem_assert(void *p)
{
if(p == NULL) {
while(1);
}
}
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/
/**
* Halt on NULL pointer
* p pointer to a memory
*/
#if USE_LV_LOG == 0
# define lv_mem_assert(p) {if(p == NULL) while(1); }
#else
# define lv_mem_assert(p) {if(p == NULL) {lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, "Out of memory!"); while(1); }}
#endif
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif

View File

@@ -56,6 +56,11 @@ void lv_task_init(void)
*/ */
LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_DEBUG, __FILE__, __LINE__, "lv_task_handler started");
#endif
static uint32_t idle_period_start = 0; static uint32_t idle_period_start = 0;
static uint32_t handler_start = 0; static uint32_t handler_start = 0;
static uint32_t busy_time = 0; static uint32_t busy_time = 0;
@@ -128,6 +133,10 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_DEBUG, __FILE__, __LINE__, "lv_task_handler finished");
#endif
} }
/** /**
@@ -175,7 +184,6 @@ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t
new_lv_task->last_run = lv_tick_get(); new_lv_task->last_run = lv_tick_get();
return new_lv_task; return new_lv_task;
} }
/** /**

View File

@@ -50,6 +50,11 @@ static lv_design_func_t ancestor_design;
*/ */
lv_obj_t * lv_arc_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_arc_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Arc create stared");
#endif
/*Create the ancestor of arc*/ /*Create the ancestor of arc*/
lv_obj_t * new_arc = lv_obj_create(par, copy); lv_obj_t * new_arc = lv_obj_create(par, copy);
lv_mem_assert(new_arc); lv_mem_assert(new_arc);
@@ -85,6 +90,10 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_arc); lv_obj_refresh_style(new_arc);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Arc create ready");
#endif
return new_arc; return new_arc;
} }

View File

@@ -52,6 +52,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_bar_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_bar_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Bar create stared");
#endif
/*Create the ancestor basic object*/ /*Create the ancestor basic object*/
lv_obj_t * new_bar = lv_obj_create(par, copy); lv_obj_t * new_bar = lv_obj_create(par, copy);
lv_mem_assert(new_bar); lv_mem_assert(new_bar);
@@ -97,6 +102,11 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, lv_obj_t * copy)
lv_bar_set_value(new_bar, ext->cur_value); lv_bar_set_value(new_bar, ext->cur_value);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Bar create ready");
#endif
return new_bar; return new_bar;
} }

View File

@@ -67,6 +67,11 @@ static lv_point_t ink_point;
*/ */
lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Button create stared");
#endif
lv_obj_t * new_btn; lv_obj_t * new_btn;
new_btn = lv_cont_create(par, copy); new_btn = lv_cont_create(par, copy);
@@ -135,6 +140,11 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_btn); lv_obj_refresh_style(new_btn);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Button create raedy");
#endif
return new_btn; return new_btn;
} }

View File

@@ -64,6 +64,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Button matrix create stared");
#endif
/*Create the ancestor object*/ /*Create the ancestor object*/
lv_obj_t * new_btnm = lv_obj_create(par, copy); lv_obj_t * new_btnm = lv_obj_create(par, copy);
lv_mem_assert(new_btnm); lv_mem_assert(new_btnm);
@@ -121,6 +126,9 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy)
ext->btn_id_tgl = copy_ext->btn_id_tgl; ext->btn_id_tgl = copy_ext->btn_id_tgl;
lv_btnm_set_map(new_btnm, lv_btnm_get_map(copy)); lv_btnm_set_map(new_btnm, lv_btnm_get_map(copy));
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Button matrix create ready");
#endif
return new_btnm; return new_btnm;
} }

View File

@@ -70,6 +70,11 @@ static const char * month_name[12] = {"January", "February", "March", "Ap
*/ */
lv_obj_t * lv_calendar_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_calendar_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Calendar create stared");
#endif
/*Create the ancestor of calendar*/ /*Create the ancestor of calendar*/
lv_obj_t * new_calendar = lv_obj_create(par, copy); lv_obj_t * new_calendar = lv_obj_create(par, copy);
lv_mem_assert(new_calendar); lv_mem_assert(new_calendar);
@@ -139,6 +144,11 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_calendar); lv_obj_refresh_style(new_calendar);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Calendar create ready");
#endif
return new_calendar; return new_calendar;
} }

View File

@@ -50,6 +50,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_cb_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_cb_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Check box create stared");
#endif
/*Create the ancestor basic object*/ /*Create the ancestor basic object*/
lv_obj_t * new_cb = lv_btn_create(par, copy); lv_obj_t * new_cb = lv_btn_create(par, copy);
lv_mem_assert(new_cb); lv_mem_assert(new_cb);
@@ -105,6 +110,11 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_set_design_func(ext->bullet, lv_bullet_design); lv_obj_set_design_func(ext->bullet, lv_bullet_design);
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Check box create ready");
#endif
return new_cb; return new_cb;
} }

View File

@@ -57,6 +57,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_chart_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_chart_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Chart create stared");
#endif
/*Create the ancestor basic object*/ /*Create the ancestor basic object*/
lv_obj_t * new_chart = lv_obj_create(par, copy); lv_obj_t * new_chart = lv_obj_create(par, copy);
lv_mem_assert(new_chart); lv_mem_assert(new_chart);
@@ -111,6 +116,11 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_chart); lv_obj_refresh_style(new_chart);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Chart create ready");
#endif
return new_chart; return new_chart;
} }

View File

@@ -62,6 +62,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_cont_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_cont_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Container create stared");
#endif
/*Create a basic object*/ /*Create a basic object*/
lv_obj_t * new_cont = lv_obj_create(par, copy); lv_obj_t * new_cont = lv_obj_create(par, copy);
lv_mem_assert(new_cont); lv_mem_assert(new_cont);
@@ -101,6 +106,10 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_cont); lv_obj_refresh_style(new_cont);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Container create ready");
#endif
return new_cont; return new_cont;
} }

View File

@@ -66,6 +66,11 @@ static lv_design_func_t ancestor_design;
*/ */
lv_obj_t * lv_ddlist_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_ddlist_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Drop down list create stared");
#endif
/*Create the ancestor drop down list*/ /*Create the ancestor drop down list*/
lv_obj_t * new_ddlist = lv_page_create(par, copy); lv_obj_t * new_ddlist = lv_page_create(par, copy);
lv_mem_assert(new_ddlist); lv_mem_assert(new_ddlist);
@@ -138,6 +143,10 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_ddlist); lv_obj_refresh_style(new_ddlist);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Drop down list create ready");
#endif
return new_ddlist; return new_ddlist;
} }

View File

@@ -60,6 +60,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_gauge_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_gauge_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Gauge create stared");
#endif
/*Create the ancestor gauge*/ /*Create the ancestor gauge*/
lv_obj_t * new_gauge = lv_lmeter_create(par, copy); lv_obj_t * new_gauge = lv_lmeter_create(par, copy);
lv_mem_assert(new_gauge); lv_mem_assert(new_gauge);
@@ -111,6 +116,10 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_gauge); lv_obj_refresh_style(new_gauge);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Gauge create ready");
#endif
return new_gauge; return new_gauge;
} }

View File

@@ -54,6 +54,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_img_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_img_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Image create stared");
#endif
lv_obj_t * new_img = NULL; lv_obj_t * new_img = NULL;
/*Create a basic object*/ /*Create a basic object*/
@@ -97,6 +102,10 @@ lv_obj_t * lv_img_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_img); lv_obj_refresh_style(new_img);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Image create ready");
#endif
return new_img; return new_img;
} }

View File

@@ -75,6 +75,11 @@ static const char * kb_map_num[] = {
*/ */
lv_obj_t * lv_kb_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_kb_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Keyboard create stared");
#endif
/*Create the ancestor of keyboard*/ /*Create the ancestor of keyboard*/
lv_obj_t * new_kb = lv_btnm_create(par, copy); lv_obj_t * new_kb = lv_btnm_create(par, copy);
lv_mem_assert(new_kb); lv_mem_assert(new_kb);
@@ -132,6 +137,10 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_kb); lv_obj_refresh_style(new_kb);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Keyboard create ready");
#endif
return new_kb; return new_kb;
} }

View File

@@ -64,6 +64,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_label_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_label_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Label create stared");
#endif
/*Create a basic object*/ /*Create a basic object*/
lv_obj_t * new_label = lv_obj_create(par, copy); lv_obj_t * new_label = lv_obj_create(par, copy);
lv_mem_assert(new_label); lv_mem_assert(new_label);
@@ -123,6 +128,12 @@ lv_obj_t * lv_label_create(lv_obj_t * par, lv_obj_t * copy)
/*Refresh the style with new signal function*/ /*Refresh the style with new signal function*/
lv_obj_refresh_style(new_label); lv_obj_refresh_style(new_label);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Label create ready");
#endif
return new_label; return new_label;
} }

View File

@@ -52,6 +52,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_led_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_led_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Led create stared");
#endif
/*Create the ancestor basic object*/ /*Create the ancestor basic object*/
lv_obj_t * new_led = lv_obj_create(par, copy); lv_obj_t * new_led = lv_obj_create(par, copy);
lv_mem_assert(new_led); lv_mem_assert(new_led);
@@ -91,6 +96,10 @@ lv_obj_t * lv_led_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_led); lv_obj_refresh_style(new_led);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Led create ready");
#endif
return new_led; return new_led;
} }

View File

@@ -50,6 +50,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Line create stared");
#endif
/*Create a basic object*/ /*Create a basic object*/
lv_obj_t * new_line = lv_obj_create(par, copy); lv_obj_t * new_line = lv_obj_create(par, copy);
lv_mem_assert(new_line); lv_mem_assert(new_line);
@@ -87,6 +92,10 @@ lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_line); lv_obj_refresh_style(new_line);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Line create ready");
#endif
return new_line; return new_line;
} }

View File

@@ -71,6 +71,11 @@ static lv_obj_t * last_clicked_btn;
*/ */
lv_obj_t * lv_list_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_list_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "List create stared");
#endif
/*Create the ancestor basic object*/ /*Create the ancestor basic object*/
lv_obj_t * new_list = lv_page_create(par, copy); lv_obj_t * new_list = lv_page_create(par, copy);
lv_mem_assert(new_list); lv_mem_assert(new_list);
@@ -138,6 +143,10 @@ lv_obj_t * lv_list_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_list); lv_obj_refresh_style(new_list);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "List create ready");
#endif
return new_list; return new_list;
} }

View File

@@ -52,6 +52,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_lmeter_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_lmeter_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Line meter create stared");
#endif
/*Create the ancestor of line meter*/ /*Create the ancestor of line meter*/
lv_obj_t * new_lmeter = lv_obj_create(par, copy); lv_obj_t * new_lmeter = lv_obj_create(par, copy);
lv_mem_assert(new_lmeter); lv_mem_assert(new_lmeter);
@@ -100,6 +105,10 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_lmeter); lv_obj_refresh_style(new_lmeter);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Line meter create ready");
#endif
return new_lmeter; return new_lmeter;
} }

View File

@@ -60,6 +60,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_mbox_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_mbox_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Message box create stared");
#endif
/*Create the ancestor message box*/ /*Create the ancestor message box*/
lv_obj_t * new_mbox = lv_cont_create(par, copy); lv_obj_t * new_mbox = lv_cont_create(par, copy);
lv_mem_assert(new_mbox); lv_mem_assert(new_mbox);
@@ -113,6 +118,10 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_mbox); lv_obj_refresh_style(new_mbox);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Message box create ready");
#endif
return new_mbox; return new_mbox;
} }

View File

@@ -53,6 +53,11 @@ static lv_design_func_t ancestor_design;
*/ */
lv_obj_t * lv_templ_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_templ_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "template create stared");
#endif
/*Create the ancestor of template*/ /*Create the ancestor of template*/
/*TODO modify it to the ancestor create function */ /*TODO modify it to the ancestor create function */
lv_obj_t * new_templ = lv_ANCESTOR_create(par, copy); lv_obj_t * new_templ = lv_ANCESTOR_create(par, copy);
@@ -82,6 +87,9 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, lv_obj_t * copy)
/*Refresh the style with new signal function*/ /*Refresh the style with new signal function*/
lv_obj_refresh_style(new_templ); lv_obj_refresh_style(new_templ);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "template create ready");
#endif
return new_templ; return new_templ;
} }

View File

@@ -57,6 +57,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Page create stared");
#endif
/*Create the ancestor object*/ /*Create the ancestor object*/
lv_obj_t * new_page = lv_cont_create(par, copy); lv_obj_t * new_page = lv_cont_create(par, copy);
lv_mem_assert(new_page); lv_mem_assert(new_page);
@@ -140,6 +145,11 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
lv_page_sb_refresh(new_page); lv_page_sb_refresh(new_page);
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Page create ready");
#endif
return new_page; return new_page;
} }

View File

@@ -55,6 +55,11 @@ static lv_design_func_t ancestor_design;
*/ */
lv_obj_t * lv_preload_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_preload_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Preloader create stared");
#endif
/*Create the ancestor of pre loader*/ /*Create the ancestor of pre loader*/
lv_obj_t * new_preload = lv_arc_create(par, copy); lv_obj_t * new_preload = lv_arc_create(par, copy);
lv_mem_assert(new_preload); lv_mem_assert(new_preload);
@@ -104,6 +109,10 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_preload); lv_obj_refresh_style(new_preload);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Preloader create ready");
#endif
return new_preload; return new_preload;
} }

View File

@@ -60,6 +60,11 @@ static lv_signal_func_t ancestor_scrl_signal;
*/ */
lv_obj_t * lv_roller_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_roller_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Roller create stared");
#endif
/*Create the ancestor of roller*/ /*Create the ancestor of roller*/
lv_obj_t * new_roller = lv_ddlist_create(par, copy); lv_obj_t * new_roller = lv_ddlist_create(par, copy);
lv_mem_assert(new_roller); lv_mem_assert(new_roller);
@@ -109,6 +114,10 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Roller create ready");
#endif
return new_roller; return new_roller;
} }

View File

@@ -53,6 +53,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_slider_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_slider_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Slider create stared");
#endif
/*Create the ancestor slider*/ /*Create the ancestor slider*/
lv_obj_t * new_slider = lv_bar_create(par, copy); lv_obj_t * new_slider = lv_bar_create(par, copy);
lv_mem_assert(new_slider); lv_mem_assert(new_slider);
@@ -101,6 +106,10 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_slider); lv_obj_refresh_style(new_slider);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Slider create ready");
#endif
return new_slider; return new_slider;
} }

View File

@@ -50,6 +50,11 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_sw_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_sw_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Switch create stared");
#endif
/*Create the ancestor of switch*/ /*Create the ancestor of switch*/
lv_obj_t * new_sw = lv_slider_create(par, copy); lv_obj_t * new_sw = lv_slider_create(par, copy);
lv_mem_assert(new_sw); lv_mem_assert(new_sw);
@@ -100,6 +105,10 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_sw); lv_obj_refresh_style(new_sw);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Switch create ready");
#endif
return new_sw; return new_sw;
} }

View File

@@ -74,6 +74,11 @@ static lv_signal_func_t scrl_signal;
*/ */
lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Text area create stared");
#endif
/*Create the ancestor object*/ /*Create the ancestor object*/
lv_obj_t * new_ta = lv_page_create(par, copy); lv_obj_t * new_ta = lv_page_create(par, copy);
lv_mem_assert(new_ta); lv_mem_assert(new_ta);
@@ -162,6 +167,10 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy)
lv_anim_create(&a); lv_anim_create(&a);
#endif #endif
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Text area create ready");
#endif
return new_ta; return new_ta;
} }

View File

@@ -66,6 +66,12 @@ static const char * tab_def[] = {""};
*/ */
lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Tabview create stared");
#endif
/*Create the ancestor of tab*/ /*Create the ancestor of tab*/
lv_obj_t * new_tabview = lv_obj_create(par, copy); lv_obj_t * new_tabview = lv_obj_create(par, copy);
lv_mem_assert(new_tabview); lv_mem_assert(new_tabview);
@@ -170,6 +176,10 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_tabview); lv_obj_refresh_style(new_tabview);
} }
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Tabview create ready");
#endif
return new_tabview; return new_tabview;
} }
@@ -811,7 +821,6 @@ static void tabview_realign(lv_obj_t * tabview)
pages = lv_obj_get_child(ext->content, pages); pages = lv_obj_get_child(ext->content, pages);
} }
lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
lv_tabview_set_tab_act(tabview, ext->tab_cur, false); lv_tabview_set_tab_act(tabview, ext->tab_cur, false);

View File

@@ -46,6 +46,12 @@ static lv_signal_func_t ancestor_signal;
*/ */
lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy) lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy)
{ {
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, "Window create stared");
#endif
/*Create the ancestor object*/ /*Create the ancestor object*/
lv_obj_t * new_win = lv_obj_create(par, copy); lv_obj_t * new_win = lv_obj_create(par, copy);
lv_mem_assert(new_win); lv_mem_assert(new_win);
@@ -96,16 +102,13 @@ lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy)
lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, th->win.content.scrl); lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, th->win.content.scrl);
lv_win_set_style(new_win, LV_WIN_STYLE_BTN_REL, th->win.btn.rel); lv_win_set_style(new_win, LV_WIN_STYLE_BTN_REL, th->win.btn.rel);
lv_win_set_style(new_win, LV_WIN_STYLE_BTN_PR, th->win.btn.pr); lv_win_set_style(new_win, LV_WIN_STYLE_BTN_PR, th->win.btn.pr);
} else { } else {
lv_win_set_style(new_win, LV_WIN_STYLE_BG, &lv_style_plain); lv_win_set_style(new_win, LV_WIN_STYLE_BG, &lv_style_plain);
lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, &lv_style_transp); lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, &lv_style_transp);
lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, &lv_style_transp); lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, &lv_style_transp);
lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, &lv_style_plain_color); lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, &lv_style_plain_color);
} }
lv_obj_set_signal_func(new_win, lv_win_signal); lv_obj_set_signal_func(new_win, lv_win_signal);
lv_obj_set_size(new_win, LV_HOR_RES, LV_VER_RES); lv_obj_set_size(new_win, LV_HOR_RES, LV_VER_RES);
} }
@@ -137,6 +140,12 @@ lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy)
lv_win_realign(new_win); lv_win_realign(new_win);
#if USE_LV_LOG
lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "Window create ready");
#endif
return new_win; return new_win;
} }