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