From 208d352af4b8c756c60c87ee9a2c60a9ba4ae4c4 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Sun, 18 Apr 2021 21:42:04 +0200 Subject: [PATCH] Set default HASP_LOG_LEVEL=LOG_LEVEL_TRACE --- include/hasp_macro.h | 18 +++++++++--------- include/lv_comp_conf.h | 42 ------------------------------------------ platformio.ini | 2 +- src/hasp/hasp.cpp | 4 ++-- 4 files changed, 12 insertions(+), 54 deletions(-) delete mode 100644 include/lv_comp_conf.h diff --git a/include/hasp_macro.h b/include/hasp_macro.h index d3b6bdcc..9c60218e 100644 --- a/include/hasp_macro.h +++ b/include/hasp_macro.h @@ -6,7 +6,7 @@ #else #define LOG_OUTPUT(...) Log.output(...) -#if HASP_LOG_LEVEL > LOG_LEVEL_FATAL +#if HASP_LOG_LEVEL >= LOG_LEVEL_FATAL #define LOG_FATAL(...) \ Log.fatal(__VA_ARGS__); \ while(true) { \ @@ -17,49 +17,49 @@ } while(0) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_ALERT +#if HASP_LOG_LEVEL >= LOG_LEVEL_ALERT #define LOG_ALERT(...) Log.alert(__VA_ARGS__) #else #define LOG_ALERT(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_CRITICAL +#if HASP_LOG_LEVEL >= LOG_LEVEL_CRITICAL #define LOG_CRITICAL(...) Log.critical(__VA_ARGS__) #else #define LOG_CRITICAL(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_ERROR +#if HASP_LOG_LEVEL >= LOG_LEVEL_ERROR #define LOG_ERROR(...) Log.error(__VA_ARGS__) #else #define LOG_ERROR(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_WARNING +#if HASP_LOG_LEVEL >= LOG_LEVEL_WARNING #define LOG_WARNING(...) Log.warning(__VA_ARGS__) #else #define LOG_WARNING(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_INFO +#if HASP_LOG_LEVEL >= LOG_LEVEL_INFO #define LOG_INFO(...) Log.notice(__VA_ARGS__) #else #define LOG_INFO(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_TRACE +#if HASP_LOG_LEVEL >= LOG_LEVEL_TRACE #define LOG_TRACE(...) Log.trace(__VA_ARGS__) #else #define LOG_TRACE(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_VERBOSE +#if HASP_LOG_LEVEL >= LOG_LEVEL_VERBOSE #define LOG_VERBOSE(...) Log.verbose(__VA_ARGS__) #else #define LOG_VERBOSE(...) #endif -#if HASP_LOG_LEVEL > LOG_LEVEL_DEBUG +#if HASP_LOG_LEVEL >= LOG_LEVEL_DEBUG #define LOG_DEBUG(...) Log.debug(__VA_ARGS__) #else #define LOG_DEBUG(...) diff --git a/include/lv_comp_conf.h b/include/lv_comp_conf.h deleted file mode 100644 index a178c803..00000000 --- a/include/lv_comp_conf.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file lv_comp_conf.h - * - */ - -/* - * COPY THIS FILE AS `lv_comp_conf.h` NEXT TO the `lvgl` FOLDER - */ - -#if 1 /*Set it to "1" to enable content*/ - -#ifndef LV_COMP_CONF_H -#define LV_COMP_CONF_H - -#define LV_USE_CALENDAR 1 -#define LV_USE_CALENDAR_HEADER_ARROW 1 - -#define LV_USE_COLORWHEEL 1 - -#define LV_USE_KEYBOARD 1 - -#define LV_USE_LED 1 -#define LV_LED_BRIGHT_MIN 0 -#define LV_LED_BRIGHT_MAX 255 - -#define LV_USE_LIST 1 - -#define LV_USE_MSGBOX 1 - -#define LV_USE_SPINBOX 1 - -#define LV_USE_SPINNER 1 - -#define LV_USE_TABVIEW 1 - -#define LV_USE_TILEVIEW 1 - -#define LV_USE_WIN 1 - -#endif /*LV_COMP_CONF_H*/ - -#endif /*End of "Content enable"*/ diff --git a/platformio.ini b/platformio.ini index 1563fc05..6e51741e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -61,7 +61,7 @@ build_flags = -D HASP_VER_MAJ=0 -D HASP_VER_MIN=5 -D HASP_VER_REV=0 - -D HASP_LOG_LEVEL=9 + -D HASP_LOG_LEVEL=LOG_LEVEL_TRACE ${override.build_flags} ; -- Shared library dependencies in all environments diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index a8056793..e94dd47e 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -136,15 +136,15 @@ bool hasp_update_sleep_state() void hasp_enable_wakeup_touch() { - LOG_VERBOSE(TAG_HASP, F("Wakeup touch enabled")); lv_obj_set_click(lv_disp_get_layer_sys(NULL), true); // enable first touch lv_obj_set_event_cb(lv_disp_get_layer_sys(NULL), wakeup_event_handler); + LOG_INFO(TAG_HASP, F("Wakeup touch enabled")); } void hasp_disable_wakeup_touch() { - LOG_VERBOSE(TAG_HASP, F("Wakeup touch disabled")); lv_obj_set_click(lv_disp_get_layer_sys(NULL), false); // disable first touch + LOG_INFO(TAG_HASP, F("Wakeup touch disabled")); } /**