esp_garden git · master
Distributed ESP sensor and actuator system (garden)
C++ 70.7% Markdown 18% C 10.7%git clone https://git.christianimmanuel.de/embedded/esp_garden.gitwget https://git.christianimmanuel.de/embedded/esp_garden/archive/esp_garden.tar.gzFix inverted address check
client_sensor/main/ClientSensor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client_sensor/main/ClientSensor.cpp b/client_sensor/main/ClientSensor.cpp index 64f86d0..2463fd2 100644 --- a/client_sensor/main/ClientSensor.cpp +++ b/client_sensor/main/ClientSensor.cpp @@ -215,8 +215,10 @@ void on_DataRecv(const esp_now_recv_info *info, const uint8_t *data, int len) { // --- Filter by source MAC --- const uint8_t *src = info->src_addr; - if (memcmp(src, PEER_SERVER, 6) == 0) { + if (memcmp(src, PEER_SERVER, 6) != 0) { ESP_LOGW(TAG, "Ignoring message: unknown sender"); + ESP_LOGW(TAG, "%02X:%02X:%02X:%02X:%02X:%02X", + src[0], src[1], src[2], src[3], src[4], src[5]); return; }