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
43dcb832d5
commit
05c76d1134
1 changed files with 6 additions and 1 deletions
|
@ -339,11 +339,16 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// no need to do anything if the mode is correct
|
// no need to do anything if the mode is correct
|
||||||
if (mode == this->get_mode_()) {
|
if (this->get_mode_() == mode) {
|
||||||
this->config_mode_ = mode;
|
this->config_mode_ = mode;
|
||||||
ESP_LOGD(TAG, "Mode is already correct");
|
ESP_LOGD(TAG, "Mode is already correct");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// no need to do anything if the mode is correct
|
||||||
|
if (!this->can_send_message_()) {
|
||||||
|
ESP_LOGD(TAG, "Device busy lets wait");
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
// Mode 0 | normal operation
|
// Mode 0 | normal operation
|
||||||
|
|
Loading…
Reference in a new issue