From 1874f477678365b483866d61179661cae53ced5d Mon Sep 17 00:00:00 2001 From: NP v/d Spek Date: Sun, 29 Sep 2024 19:44:20 +0200 Subject: [PATCH] remove header logs --- esphome/components/espnow/espnow.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/esphome/components/espnow/espnow.h b/esphome/components/espnow/espnow.h index 0af50cadea..5de1ec029a 100644 --- a/esphome/components/espnow/espnow.h +++ b/esphome/components/espnow/espnow.h @@ -7,8 +7,6 @@ #include "esphome/core/helpers.h" #include "esphome/core/bytebuffer.h" -#include "esphome/core/log.h" - #include #include @@ -267,28 +265,21 @@ template class SendAction : public Action, public Parente void set_data_template(std::function func) { this->data_func_ = func; this->static_ = false; - ESP_LOGCONFIG("ESPNOW:SendAction", "Add ByteBuffer lambda value to send"); } void set_data_static(const std::vector &data) { this->data_static_ = data; this->static_ = true; - ESP_LOGCONFIG("ESPNOW:SendAction", "Add static std:vector value to send"); } void play(Ts... x) override { - ESP_LOGI("ESPNOW:SendAction", "Execute Play."); - /* - uint64_t mac = this->mac_.value(x...); + uint64_t mac = this->mac_.value(x...); - if (this->static_) { - ESP_LOGI("ESPNOW:SendAction", "Action Send static std:vector value now."); - // this->parent_->get_default_protocol()->send(mac, this->data_static_.data(), this->data_static_.size()); - } else { - ESP_LOGI("ESPNOW:SendAction", "Action Send ByteBuffer lambda value now"); - ByteBuffer data = this->data_func_(x...); - // this->parent_->get_default_protocol()->send(mac, data.get_data().data(), (uint8_t) data.get_used_space()); - } - */ + if (this->static_) { + this->parent_->get_default_protocol()->send(mac, this->data_static_.data(), this->data_static_.size()); + } else { + ByteBuffer data = this->data_func_(x...); + this->parent_->get_default_protocol()->send(mac, data.get_data().data(), (uint8_t) data.get_used_space()); + } } protected: