From 60d2e22ef36fe5fd85d98a622651a4ca9a51ad33 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Sun, 2 May 2021 00:45:08 +0200 Subject: [PATCH] Improve logging --- src/hasp_gui.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index 36104edc..54288d51 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -97,10 +97,7 @@ void guiCalibrate(void) void guiSetup(void) { // Register logger to capture lvgl_init output - LOG_TRACE(TAG_LVGL, F(D_SERVICE_STARTING)); -#if LV_USE_LOG != 0 - lv_log_register_print_cb(debugLvglLogEvent); -#endif + LOG_TRACE(TAG_TFT, F(D_SERVICE_STARTING)); // Initialize the TFT haspTft.init(240, 320); @@ -108,6 +105,13 @@ void guiSetup(void) haspTft.set_invert(gui_settings.invert_display); haspTft.show_info(); + LOG_INFO(TAG_TFT, F(D_SERVICE_STARTED)); + LOG_TRACE(TAG_LVGL, F(D_SERVICE_STARTING)); + +#if LV_USE_LOG != 0 + lv_log_register_print_cb(debugLvglLogEvent); +#endif + /* Create the Virtual Device Buffers */ #if defined(ARDUINO_ARCH_ESP32) @@ -277,6 +281,7 @@ void guiSetup(void) lv_obj_set_style_local_bg_opa(lv_layer_sys(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0); // guiStart(); // Ticker + LOG_INFO(TAG_LVGL, F(D_SERVICE_STARTED)); } void guiLoop(void)