Improve logging

This commit is contained in:
fvanroie 2021-05-02 00:45:08 +02:00
parent 77beb04d27
commit 60d2e22ef3

View File

@ -97,10 +97,7 @@ void guiCalibrate(void)
void guiSetup(void) void guiSetup(void)
{ {
// Register logger to capture lvgl_init output // Register logger to capture lvgl_init output
LOG_TRACE(TAG_LVGL, F(D_SERVICE_STARTING)); LOG_TRACE(TAG_TFT, F(D_SERVICE_STARTING));
#if LV_USE_LOG != 0
lv_log_register_print_cb(debugLvglLogEvent);
#endif
// Initialize the TFT // Initialize the TFT
haspTft.init(240, 320); haspTft.init(240, 320);
@ -108,6 +105,13 @@ void guiSetup(void)
haspTft.set_invert(gui_settings.invert_display); haspTft.set_invert(gui_settings.invert_display);
haspTft.show_info(); 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 */ /* Create the Virtual Device Buffers */
#if defined(ARDUINO_ARCH_ESP32) #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); lv_obj_set_style_local_bg_opa(lv_layer_sys(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
// guiStart(); // Ticker // guiStart(); // Ticker
LOG_INFO(TAG_LVGL, F(D_SERVICE_STARTED));
} }
void guiLoop(void) void guiLoop(void)