From dc6bdedec51f19ae2ce92ac544a57329289ae9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Tue, 26 Mar 2024 16:19:55 +0000 Subject: [PATCH] Update lora.cpp --- esphome/components/lora/lora.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/esphome/components/lora/lora.cpp b/esphome/components/lora/lora.cpp index a7caab7529..fe2d062bb1 100644 --- a/esphome/components/lora/lora.cpp +++ b/esphome/components/lora/lora.cpp @@ -41,12 +41,12 @@ void Lora::setup() { if (this->pin_m0_ != nullptr) { this->pin_m0_->pin_mode(gpio::FLAG_OUTPUT); ESP_LOGD(TAG, "Init M0 pin!"); - this->pin_m0_->digital_write(HIGH); + this->pin_m0_->digital_write(false); } if (this->pin_m1_ != nullptr) { this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT); ESP_LOGD(TAG, "Init M1 pin!"); - this->pin_m1_->digital_write(HIGH); + this->pin_m1_->digital_write(false); } set_mode_(MODE_0_NORMAL); @@ -95,25 +95,25 @@ void Lora::set_mode_(ModeType mode) { switch (mode) { case MODE_0_NORMAL: // Mode 0 | normal operation - this->pin_m0_->digital_write(LOW); - this->pin_m1_->digital_write(LOW); + this->pin_m0_->digital_write(false); + this->pin_m1_->digital_write(false); ESP_LOGD(TAG, "MODE NORMAL!"); break; case MODE_1_WOR_TRANSMITTER: - this->pin_m0_->digital_write(HIGH); - this->pin_m1_->digital_write(LOW); + this->pin_m0_->digital_write(true); + this->pin_m1_->digital_write(false); ESP_LOGD(TAG, "MODE WOR!"); break; case MODE_2_WOR_RECEIVER: // case MODE_2_PROGRAM: - this->pin_m0_->digital_write(LOW); - this->pin_m1_->digital_write(HIGH); + this->pin_m0_->digital_write(false); + this->pin_m1_->digital_write(true); ESP_LOGD(TAG, "MODE RECEIVING!"); break; case MODE_3_CONFIGURATION: // Mode 3 | Setting operation - this->pin_m0_->digital_write(HIGH); - this->pin_m1_->digital_write(HIGH); + this->pin_m0_->digital_write(true); + this->pin_m1_->digital_write(true); ESP_LOGD(TAG, "MODE SLEEP CONFIG!"); break; case MODE_INIT: