summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcooljqln <cooljqln@noreply.codeberg.org>2025-05-16 04:29:27 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2025-05-16 04:29:27 +0000
commit978076ec5ccbec561f4b440fe58d7f8107083ba6 (patch)
tree8895e3be1755b7c3a19310afb8f21f6f27f1dc63
parent2b9ee3d14871c1c557b8fb1845476a62b3999ede (diff)
parent45f5e8805436a0d37f7a1cc00eba48afad1a0a64 (diff)
downloadtangara-fw-978076ec5ccbec561f4b440fe58d7f8107083ba6.tar.gz
Merge pull request 'app console: add LVGL heap to heap stats' (#365) from Be.ing/tangara-fw:lvgl_heap_report into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/365
-rw-r--r--src/tangara/app_console/app_console.cpp9
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;
}