mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
Update lora.cpp
This commit is contained in:
parent
a74d7a0ef0
commit
d89a29d451
1 changed files with 7 additions and 6 deletions
|
@ -7,12 +7,13 @@ void Lora::update() {
|
|||
if (this->pin_aux_->digital_read()) {
|
||||
this->starting_to_check_ = 0;
|
||||
this->time_out_after_ = 0;
|
||||
}
|
||||
// it has taken too long to complete, error out!
|
||||
if ((millis() - this->starting_to_check_) > this->time_out_after_) {
|
||||
ESP_LOGD(TAG, "Timeout error! Resetting timers");
|
||||
this->starting_to_check_ = 0;
|
||||
this->time_out_after_ = 0;
|
||||
} else {
|
||||
// it has taken too long to complete, error out!
|
||||
if ((millis() - this->starting_to_check_) > this->time_out_after_) {
|
||||
ESP_LOGD(TAG, "Timeout error! Resetting timers");
|
||||
this->starting_to_check_ = 0;
|
||||
this->time_out_after_ = 0;
|
||||
}
|
||||
}
|
||||
if (!this->update_needed_)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue