mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 01:34:18 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
7b61c45aa5
commit
e84a6c40fc
1 changed files with 5 additions and 2 deletions
|
@ -297,8 +297,11 @@ void EbyteLoraComponent::setup() {
|
||||||
ESP_LOGD(TAG, "Setup success");
|
ESP_LOGD(TAG, "Setup success");
|
||||||
}
|
}
|
||||||
void EbyteLoraComponent::get_current_config_() {
|
void EbyteLoraComponent::get_current_config_() {
|
||||||
if (this->get_mode_() != CONFIGURATION)
|
if (this->get_mode_() != CONFIGURATION) {
|
||||||
|
ESP_LOGD(TAG, "Mode not set right requesting that and returning");
|
||||||
this->set_mode_(CONFIGURATION);
|
this->set_mode_(CONFIGURATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this->can_send_message_()) {
|
if (this->can_send_message_()) {
|
||||||
uint8_t data[3] = {PROGRAM_CONF, 0x00, 0x08};
|
uint8_t data[3] = {PROGRAM_CONF, 0x00, 0x08};
|
||||||
this->write_array(data, sizeof(data));
|
this->write_array(data, sizeof(data));
|
||||||
|
@ -349,7 +352,7 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
||||||
if (this->config_mode_ == MODE_INIT) {
|
if (this->config_mode_ == MODE_INIT) {
|
||||||
ESP_LOGD(TAG, "Very first time setting the mode, going to ignore device busy state");
|
ESP_LOGD(TAG, "Very first time setting the mode, going to ignore device busy state");
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "Device busy lets wait");
|
ESP_LOGD(TAG, "Device busy lets wait, current mode is %u", this->config_mode_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue