Update lora.cpp

This commit is contained in:
Daniël Koek 2024-03-26 15:50:18 +00:00
parent a74d7a0ef0
commit d89a29d451

View file

@ -7,13 +7,14 @@ void Lora::update() {
if (this->pin_aux_->digital_read()) {
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;
if (this->rssi_sensor_ != nullptr)