From 0744e7195b1158e2f48d4a367745a45ffb58b84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Sun, 24 Mar 2024 16:44:21 +0000 Subject: [PATCH] Update lora.cpp --- esphome/components/lora/lora.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/esphome/components/lora/lora.cpp b/esphome/components/lora/lora.cpp index 204a1f4081..8b5b74943a 100644 --- a/esphome/components/lora/lora.cpp +++ b/esphome/components/lora/lora.cpp @@ -126,8 +126,8 @@ void Lora::dump_config() { }; void Lora::digital_write(uint8_t pin, bool value) { ESP_LOGD(TAG, "Starting to write message"); - // std::string message = str_snprintf("%02x%02x", 9, pin, value); - this->sendMessage("bla"); + std::string message = str_snprintf("%02x%02x", 9, pin, value); + this->sendMessage(message); } bool Lora::sendMessage(std::string message) { uint8_t size = message.length(); @@ -138,10 +138,9 @@ bool Lora::sendMessage(std::string message) { return false; } ESP_LOGD(TAG, "Sending: %s", message); - // this->write_array((uint8_t *) &messageFixed, size); - // bool result = this->waitCompleteResponse(5000, 5000); - // return result; - return true; + this->write_array((uint8_t *) &messageFixed, size); + bool result = this->waitCompleteResponse(5000, 5000); + return result; } void Lora::loop() { if (!available()) {