Update ebyte_lora_component.cpp

This commit is contained in:
Daniël Koek 2024-10-16 14:29:37 +01:00
parent 509e71ab2c
commit 2663b3e794

View file

@ -292,9 +292,9 @@ void EbyteLoraComponent::setup() {
#endif #endif
this->pin_aux_->pin_mode(gpio::FLAG_INPUT); this->pin_aux_->pin_mode(gpio::FLAG_INPUT);
this->pin_aux_->setup(); this->pin_aux_->setup();
this->pin_m0_->pin_mode(gpio::FLAG_OUTPUT); this->pin_m0_->pin_mode(gpio::FLAG_OUTPUT | gpio::FLAG_INPUT);
this->pin_m0_->setup(); this->pin_m0_->setup();
this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT); this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT | gpio::FLAG_INPUT);
this->pin_m1_->setup(); this->pin_m1_->setup();
// set them initial both to high // set them initial both to high
@ -312,7 +312,9 @@ void EbyteLoraComponent::request_current_config_() {
return; return;
} }
if (this->get_mode_() != CONFIGURATION) { if (this->get_mode_() != CONFIGURATION) {
this->set_mode_(NORMAL);
ESP_LOGD(TAG, "Mode not set right"); ESP_LOGD(TAG, "Mode not set right");
delay(20);
return; return;
} }
// program conf command, start at 0 with a size of 8 // program conf command, start at 0 with a size of 8