mirror of
https://github.com/esphome/esphome.git
synced 2025-01-22 12:26:01 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
4ef9cd7605
commit
b3b1751e98
1 changed files with 2 additions and 11 deletions
|
@ -392,7 +392,8 @@ void EbyteLoraComponent::update() {
|
|||
if (millis() < this->busy_till_)
|
||||
return;
|
||||
if (!this->current_config_.config_set) {
|
||||
this->set_mode_(CONFIGURATION);
|
||||
if (this->get_mode_() != CONFIGURATION)
|
||||
this->set_mode_(CONFIGURATION);
|
||||
delay(20);
|
||||
ESP_LOGD(TAG, "Config not set yet! Requesting");
|
||||
this->request_current_config_();
|
||||
|
@ -403,16 +404,6 @@ void EbyteLoraComponent::update() {
|
|||
this->set_config_();
|
||||
return;
|
||||
}
|
||||
// only make it normal when config is set
|
||||
if (this->current_mode_ != NORMAL) {
|
||||
ESP_LOGD(TAG, "Current mode is not normal");
|
||||
this->current_mode_ = this->get_mode_();
|
||||
|
||||
if (this->current_mode_ != NORMAL) {
|
||||
ESP_LOGD(TAG, "Mode is not set right");
|
||||
this->set_mode_(NORMAL);
|
||||
}
|
||||
}
|
||||
auto now = millis() / 1000;
|
||||
if (this->last_key_time_ + this->recyle_time_ < now) {
|
||||
ESP_LOGD(TAG, "Requesting all systems to send new info ");
|
||||
|
|
Loading…
Reference in a new issue