mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
8b1f292bd9
commit
7b61c45aa5
1 changed files with 7 additions and 6 deletions
|
@ -294,7 +294,6 @@ void EbyteLoraComponent::setup() {
|
||||||
this->pin_aux_->setup();
|
this->pin_aux_->setup();
|
||||||
this->pin_m0_->setup();
|
this->pin_m0_->setup();
|
||||||
this->pin_m1_->setup();
|
this->pin_m1_->setup();
|
||||||
this->get_current_config_();
|
|
||||||
ESP_LOGD(TAG, "Setup success");
|
ESP_LOGD(TAG, "Setup success");
|
||||||
}
|
}
|
||||||
void EbyteLoraComponent::get_current_config_() {
|
void EbyteLoraComponent::get_current_config_() {
|
||||||
|
@ -346,11 +345,13 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
||||||
}
|
}
|
||||||
// when the system starts, aux will stay low until you set the first mode
|
// when the system starts, aux will stay low until you set the first mode
|
||||||
// so make sure mode init isn't set AND we can't sent because aux is low
|
// so make sure mode init isn't set AND we can't sent because aux is low
|
||||||
if (this->config_mode_ != MODE_INIT && !this->can_send_message_()) {
|
if (!this->can_send_message_()) {
|
||||||
ESP_LOGD(TAG, "Device busy lets wait");
|
if (this->config_mode_ == MODE_INIT) {
|
||||||
return;
|
ESP_LOGD(TAG, "Very first time setting the mode, going to ignore device busy state");
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "Very first time setting the mode, going to ignore device busy state");
|
ESP_LOGD(TAG, "Device busy lets wait");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
|
|
Loading…
Reference in a new issue