diff options
| author | Be <be.0@gmx.com> | 2025-04-06 01:19:35 -0500 |
|---|---|---|
| committer | Be <be.0@gmx.com> | 2025-04-24 22:31:37 -0500 |
| commit | 45f5e8805436a0d37f7a1cc00eba48afad1a0a64 (patch) | |
| tree | a4ae163d3203757967442b3e57e1a7f6d12e6856 /src | |
| parent | 9198af25a525c3c85ed0c94de3ac05c548d4e233 (diff) | |
| download | tangara-fw-45f5e8805436a0d37f7a1cc00eba48afad1a0a64.tar.gz | |
app console: add LVGL heap to heap stats
Diffstat (limited to 'src')
| -rw-r--r-- | src/tangara/app_console/app_console.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tangara/app_console/app_console.cpp b/src/tangara/app_console/app_console.cpp index 49cb9788..dcefc966 100644 --- a/src/tangara/app_console/app_console.cpp +++ b/src/tangara/app_console/app_console.cpp @@ -44,6 +44,7 @@ #include "database/track.hpp" #include "events/event_queue.hpp" #include "lua/lua_registry.hpp" +#include "lvgl/src/stdlib/lv_mem.h" #include "system_fsm/service_locator.hpp" #include "system_fsm/system_events.hpp" #include "ui/ui_events.hpp" @@ -373,6 +374,14 @@ int CmdHeaps(int argc, char** argv) { std::cout << (heap_caps_get_largest_free_block(MALLOC_CAP_SPIRAM) / 1024) << " KiB largest free block" << std::endl; + lv_mem_monitor_t lvgl_heap_stats; + lv_mem_monitor(&lvgl_heap_stats); + std::cout << "heap stats (LVGL):" << std::endl; + std::cout << lvgl_heap_stats.free_size / 1024 + << " KiB free" << std::endl; + std::cout << lvgl_heap_stats.free_biggest_size / 1024 + << " KiB largest free block" << std::endl; + return 0; } |
