From ab643f1c703531d0128374c6a246a9ffabe6de4e Mon Sep 17 00:00:00 2001 From: NP v/d Spek Date: Sun, 25 Aug 2024 05:34:29 +0200 Subject: [PATCH] fix an other set of issues --- esphome/components/espnow/espnow.cpp | 2 +- esphome/components/espnow/espnow_packet.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/espnow/espnow.cpp b/esphome/components/espnow/espnow.cpp index 7ae6533daa..a6220d9786 100644 --- a/esphome/components/espnow/espnow.cpp +++ b/esphome/components/espnow/espnow.cpp @@ -373,7 +373,7 @@ void ESPNowComponent::on_data_sent(const uint8_t *mac_addr, esp_now_send_status_ ESP_LOGE(TAG, "sent packet failed (0x%04x.%d)", packet.ref_id, packet.retrys); } else if (packet.mac64 != mac64) { ESP_LOGE(TAG, " Invalid mac address. (0x%04x.%d) expected: %s got %s", packet.ref_id, packet.retrys, - packet.to_str().c_str(), packet.to_str(mac64)); + packet.to_str().c_str(), packet.to_str(mac64).c_str()); } else { ESP_LOGV(TAG, "Confirm sent (0x%04x.%d)", packet.ref_id, packet.retrys); global_esp_now->unlock(); diff --git a/esphome/components/espnow/espnow_packet.c b/esphome/components/espnow/espnow_packet.c index 001a7c51c9..3dbcdda2b5 100644 --- a/esphome/components/espnow/espnow_packet.c +++ b/esphome/components/espnow/espnow_packet.c @@ -1,6 +1,6 @@ -#include "espnow_packet.h" -#if defined(USE_ESP32) +#if defined(USE_ESP32) +#include "espnow_packet.h" #include "esphome/core/log.h" static const char *const TAG = "espnow_packet";