diff --git a/components/sx127x_driver/sx127x_internal.h b/components/sx127x_driver/sx127x_internal.h index fc2b6ee..03359c3 100644 --- a/components/sx127x_driver/sx127x_internal.h +++ b/components/sx127x_driver/sx127x_internal.h @@ -73,7 +73,7 @@ typedef enum sx127x_op_mode { #ifdef NODEBUG #define SX127X_CHECK(check, str, ret_val, ...) \ if (!(check)) { \ - ESP_LOGE(SX127X_TAG, str, ##__VA_ARGS__); \ + ESP_LOGE(SX127X_TAG, str, ##__VA_ARGS__); \ return (ret_val); \ } #define SX127X_ERROR_CHECK(ret) \ @@ -87,7 +87,7 @@ typedef enum sx127x_op_mode { #else #define SX127X_CHECK(check, str, ret_val, ...) \ if (!(check)) { \ - ESP_LOGE(SX127X_TAG, "%s:%d: " #check ": " str, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + ESP_LOGE(SX127X_TAG, "%s:%d: check %s failed: " str, __FUNCTION__, __LINE__, #check, ##__VA_ARGS__); \ return (ret_val); \ } #define SX127X_ERROR_CHECK(ret) \ @@ -95,7 +95,7 @@ typedef enum sx127x_op_mode { esp_err_t _error_code = (ret); \ if (_error_code != ESP_OK) { \ const char *_error_name = esp_err_to_name(_error_code); \ - ESP_LOGE(SX127X_TAG, "%s:%d: %s (%d)", __FUNCTION__, __LINE__, _error_name, _error_code); \ + ESP_LOGE(SX127X_TAG, "%s:%d: %s (%d)", __FUNCTION__, __LINE__, _error_name, _error_code); \ return _error_code; \ } \ } @@ -104,7 +104,7 @@ typedef enum sx127x_op_mode { esp_err_t _error_code = (ret); \ if (_error_code != ESP_OK) { \ const char *_error_name = esp_err_to_name(_error_code); \ - ESP_LOGE(SX127X_TAG, "%s:%d: " #fun ": %s (%d)", __FUNCTION__, __LINE__, _error_name, _error_code); \ + ESP_LOGE(SX127X_TAG, "%s:%d: %s failed: %s (%d)", __FUNCTION__, __LINE__, #fun, _error_name, _error_code); \ return _error_code; \ } \ }