* retry scan

* setup pin and log retries

* fix retries

* remove retries

---------

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel Sieb 2024-06-22 04:57:27 -07:00 committed by GitHub
parent 9c5507ab46
commit 2aacf14e96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,10 @@ static const char *const TAG = "gpio.one_wire";
void GPIOOneWireBus::setup() {
ESP_LOGCONFIG(TAG, "Setting up 1-wire bus...");
this->t_pin_->setup();
// clear bus with 480µs high, otherwise initial reset in search might fail
this->t_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
delayMicroseconds(480);
this->search();
}