You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to get this working perfectly fine on esp8266 (esp01_1m specifically), with the deletion of those two unused functions: ESP_LOGD_HEX(...). See the diff here: reversebias@bafb4a0
Note that I'm using the hardware UART of the esp8266 (tested both GPIO1/3 and GPIO15/13). No performance issues that I can see either, ie streaming engineering mode, or multiple log sessions + web server.
After compiling the include file contains errors (Using esphome 2022.12.3):
Compiling /data/ld2410-presence-sensor/.pioenvs/ld2410-presence-sensor/lib67b/ESP8266WiFi/WiFiClient.cpp.o
In file included from src/main.cpp:111:
src/ld2410.h:84:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
84 | static constexpr char *const TAG = "ld2410";
| ^~~~~~~~
In file included from src/esphome/core/log.h:8,
from src/esphome/components/api/proto.h:4,
from src/esphome/components/api/api_pb2.h:5,
from src/esphome/components/api/api_connection.h:4,
from src/esphome.h:3,
from src/main.cpp:3:
src/ld2410.h: In member function 'void LD2410::ESP_LOGD_HEX()':
src/ld2410.h:269:32: error: initializer fails to determine size of 'pstr'
269 | ESP_LOGD(TAG, res.c_str());
/data/cache/platformio/packages/framework-arduinoespressif8266/cores/esp8266/WString.h:39:76: note: in definition of macro 'FPSTR'
39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const _FlashStringHelper *>(pstr_pointer))
| ^~~~~~~~~~~~
src/esphome/core/log.h:67:36: note: in expansion of macro 'F'
67 | #define ESPHOME_LOG_FORMAT(format) F(format)
| ^
src/esphome/core/log.h:92:59: note: in expansion of macro 'ESPHOME_LOG_FORMAT'
92 | esp_log_printf(ESPHOME_LOG_LEVEL_DEBUG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:152:28: note: in expansion of macro 'esph_log_d'
152 | #define ESP_LOGD(tag, ...) esph_log_d(tag, VA_ARGS)
| ^~~~~~~~~~
src/ld2410.h:269:9: note: in expansion of macro 'ESP_LOGD'
269 | ESP_LOGD(TAG, res.c_str());
| ^~~~~~~~
src/ld2410.h:269:32: error: array must be initialized with a brace-enclosed initializer
269 | ESP_LOGD(TAG, res.c_str());
/data/cache/platformio/packages/framework-arduinoespressif8266/cores/esp8266/WString.h:39:76: note: in definition of macro 'FPSTR'
39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const _FlashStringHelper *>(pstr_pointer))
| ^~~~~~~~~~~~
src/esphome/core/log.h:67:36: note: in expansion of macro 'F'
67 | #define ESPHOME_LOG_FORMAT(format) F(format)
| ^
src/esphome/core/log.h:92:59: note: in expansion of macro 'ESPHOME_LOG_FORMAT'
92 | esp_log_printf(ESPHOME_LOG_LEVEL_DEBUG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:152:28: note: in expansion of macro 'esph_log_d'
152 | #define ESP_LOGD(tag, ...) esph_log_d(tag, VA_ARGS)
| ^~~~~~~~~~
src/ld2410.h:269:9: note: in expansion of macro 'ESP_LOGD'
269 | ESP_LOGD(TAG, res.c_str());
| ^~~~~~~~
src/ld2410.h: In member function 'void LD2410::ESP_LOGD_HEX(std::vector, uint8_t)':
src/ld2410.h:283:32: error: initializer fails to determine size of 'pstr'
283 | ESP_LOGD(TAG, res.c_str());
/data/cache/platformio/packages/framework-arduinoespressif8266/cores/esp8266/WString.h:39:76: note: in definition of macro 'FPSTR'
39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const _FlashStringHelper *>(pstr_pointer))
| ^~~~~~~~~~~~
src/esphome/core/log.h:67:36: note: in expansion of macro 'F'
67 | #define ESPHOME_LOG_FORMAT(format) F(format)
| ^
src/esphome/core/log.h:92:59: note: in expansion of macro 'ESPHOME_LOG_FORMAT'
92 | esp_log_printf(ESPHOME_LOG_LEVEL_DEBUG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:152:28: note: in expansion of macro 'esph_log_d'
152 | #define ESP_LOGD(tag, ...) esph_log_d(tag, VA_ARGS)
| ^~~~~~~~~~
src/ld2410.h:283:9: note: in expansion of macro 'ESP_LOGD'
283 | ESP_LOGD(TAG, res.c_str());
| ^~~~~~~~
src/ld2410.h:283:32: error: array must be initialized with a brace-enclosed initializer
283 | ESP_LOGD(TAG, res.c_str());
/data/cache/platformio/packages/framework-arduinoespressif8266/cores/esp8266/WString.h:39:76: note: in definition of macro 'FPSTR'
39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const _FlashStringHelper *>(pstr_pointer))
| ^~~~~~~~~~~~
src/esphome/core/log.h:67:36: note: in expansion of macro 'F'
67 | #define ESPHOME_LOG_FORMAT(format) F(format)
| ^
src/esphome/core/log.h:92:59: note: in expansion of macro 'ESPHOME_LOG_FORMAT'
92 | esp_log_printf(ESPHOME_LOG_LEVEL_DEBUG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:152:28: note: in expansion of macro 'esph_log_d'
152 | #define ESP_LOGD(tag, ...) esph_log_d(tag, VA_ARGS)
| ^~~~~~~~~~
src/ld2410.h:283:9: note: in expansion of macro 'ESP_LOGD'
283 | ESP_LOGD(TAG, res.c_str());
| ^~~~~~~~
Compiling /data/ld2410-presence-sensor/.pioenvs/ld2410-presence-sensor/lib67b/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling /data/ld2410-presence-sensor/.pioenvs/ld2410-presence-sensor/lib67b/ESP8266WiFi/WiFiServer.cpp.o
Compiling /data/ld2410-presence-sensor/.pioenvs/ld2410-presence-sensor/lib67b/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
*** [/data/ld2410-presence-sensor/.pioenvs/ld2410-presence-sensor/src/main.cpp.o] Error 1
========================== [FAILED] Took 5.64 seconds ==========================
The text was updated successfully, but these errors were encountered: