Skip to content

Commit 32cdcee

Browse files
committed
Merge branch 'bugfix/fix_print_error_log' into 'master'
fix(log): fix kernel panic when checking the error Closes #151 See merge request ae_group/ESP32_Display_Panel!9
2 parents 627214d + bf0a174 commit 32cdcee

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Bugfixes:
1010

1111
* fix(touch): fix GT911 build warning
12+
* fix(log): fix kernel panic when checking the error @Kanzll (#144)
1213
* fix(version): fix minor number check @arduinomnomnom (#148)
1314

1415
## v0.2.2 - 2025-01-09

examples/PlatformIO/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ monitor_speed = 115200
1010
build_flags =
1111
; Arduino related:
1212
-DBOARD_HAS_PSRAM ; Enable PSRAM
13-
; -DARDUINO_USB_CDC_ON_BOOT=0 ; If using UART port
13+
; -DARDUINO_USB_CDC_ON_BOOT=0 ; If using UART port
1414
-DARDUINO_USB_CDC_ON_BOOT=1 ; If using USB port
1515
-DCORE_DEBUG_LEVEL=1 ; Set to `5` for full debug output, `0` for none
1616
; LVGL related:

src/ESP_PanelLog.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,11 @@
3030
#define ESP_PANEL_CHECK_NULL_RET(x, ...) assert((x) != NULL)
3131
#define ESP_PANEL_CHECK_FALSE_RET(x, ...) assert((x) != false)
3232
#else
33-
// #if ESP_PANEL_ENABLE_LOG
34-
#define ESP_PANEL_ERROR_CHECK_LOG_FORMAT(err, format) "[%s] %s(%u): " format, esp_err_to_name(err), __FUNCTION__, __LINE__
35-
#define ESP_PANEL_ERROR_CHECK_LOGE(tag, err, format, ...) ESP_LOGE(tag, ESP_PANEL_ERROR_CHECK_LOG_FORMAT(err, format), ##__VA_ARGS__)
36-
#define ESP_PANEL_OTHER_CHECK_LOG_FORMAT(format) "%s(%u): " format, __FUNCTION__, __LINE__
37-
#define ESP_PANEL_OTHER_CHECK_LOGE(tag, format, ...) ESP_LOGE(tag, ESP_PANEL_OTHER_CHECK_LOG_FORMAT(format), ##__VA_ARGS__)
38-
// #else
39-
// #define ESP_PANEL_ERROR_CHECK_LOGE(tag, err, format, ...) do {} while(0)
40-
// #define ESP_PANEL_OTHER_CHECK_LOGE(tag, format, ...) do {} while(0)
41-
// #endif
33+
34+
#define ESP_PANEL_ERROR_CHECK_LOGE(tag, err, format, ...) \
35+
ESP_LOGE(tag, "[%s] %s(%u): " format, esp_err_to_name(err), __FUNCTION__, __LINE__, ##__VA_ARGS__)
36+
#define ESP_PANEL_OTHER_CHECK_LOGE(tag, format, ...) \
37+
ESP_LOGE(tag, "%s(%u): " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
4238

4339
#define ESP_PANEL_CHECK_ERR_RET(x, ret, fmt, ...) do { \
4440
esp_err_t err_rc_ = (x); \

0 commit comments

Comments
 (0)