Update ebyte_lora_component.cpp

This commit is contained in:
Daniël Koek 2024-10-11 12:39:41 +01:00
parent 95b5962cca
commit ef1b803e4b

View file

@ -294,10 +294,10 @@ void EbyteLoraComponent::setup() {
this->pin_aux_->setup();
this->pin_m0_->setup();
this->pin_m0_->pin_mode(gpio::FLAG_OUTPUT);
this->pin_m0_->digital_write(HIGH);
this->pin_m0_->digital_write(true);
this->pin_m1_->setup();
this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT);
this->pin_m1_->digital_write(HIGH);
this->pin_m1_->digital_write(true);
delay(20);
set_mode_(NORMAL);
ESP_LOGD(TAG, "Setup success");
@ -346,23 +346,23 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
delay(5);
switch (mode) {
case NORMAL:
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 WOR_SEND:
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 SEND!");
break;
case WOR_RECEIVER:
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 CONFIGURATION:
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 and CONFIG!");
break;
case MODE_INIT: