Update ebyte_lora_component.cpp

This commit is contained in:
Daniël Koek 2024-10-04 14:53:18 +01:00
parent 43dcb832d5
commit 05c76d1134

View file

@ -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