mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 05:06:44 +00:00
Reduce lvgl debug messages
This commit is contained in:
parent
5d69f909e5
commit
512fdde016
@ -145,14 +145,18 @@ void debugLvglLogEvent(lv_log_level_t level, const char* file, uint32_t line, co
|
|||||||
{
|
{
|
||||||
#if LV_USE_LOG != 0
|
#if LV_USE_LOG != 0
|
||||||
/* used for duplicate detection */
|
/* used for duplicate detection */
|
||||||
|
static const char* last_funcname;
|
||||||
static uint32_t lastDbgLine;
|
static uint32_t lastDbgLine;
|
||||||
static uint32_t lastDbgFreeMem;
|
// static uint32_t lastDbgFreeMem;
|
||||||
|
|
||||||
lv_mem_monitor_t mem_mon;
|
|
||||||
lv_mem_monitor(&mem_mon);
|
|
||||||
|
|
||||||
/* Reduce the number of repeated debug message */
|
/* Reduce the number of repeated debug message */
|
||||||
if(line != lastDbgLine || mem_mon.free_biggest_size != lastDbgFreeMem) {
|
if(line == lastDbgLine && funcname == last_funcname) return;
|
||||||
|
|
||||||
|
// lv_mem_monitor_t mem_mon;
|
||||||
|
// lv_mem_monitor(&mem_mon);
|
||||||
|
|
||||||
|
/* Reduce the number of repeated debug message */
|
||||||
|
// if(line != lastDbgLine || mem_mon.free_biggest_size != lastDbgFreeMem) {
|
||||||
switch(level) {
|
switch(level) {
|
||||||
case LV_LOG_LEVEL_TRACE:
|
case LV_LOG_LEVEL_TRACE:
|
||||||
LOG_VERBOSE(TAG_LVGL, descr);
|
LOG_VERBOSE(TAG_LVGL, descr);
|
||||||
@ -166,9 +170,10 @@ void debugLvglLogEvent(lv_log_level_t level, const char* file, uint32_t line, co
|
|||||||
default:
|
default:
|
||||||
LOG_TRACE(TAG_LVGL, descr);
|
LOG_TRACE(TAG_LVGL, descr);
|
||||||
}
|
}
|
||||||
|
last_funcname = funcname;
|
||||||
lastDbgLine = line;
|
lastDbgLine = line;
|
||||||
lastDbgFreeMem = mem_mon.free_biggest_size;
|
// lastDbgFreeMem = mem_mon.free_biggest_size;
|
||||||
}
|
//}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user