adafruit / Adafruit_Wippersnapper_Arduino

WipperSnapper is a firmware for creating no-code IoT electronics projects.
https://io.adafruit.com/welcome
MIT License
29 stars 44 forks source link

Add main I2C sensor Retry-loop #593

Closed tyeth closed 2 months ago

tyeth commented 3 months ago

This is a result of having retries in the drivers/wrappers, and a desire for them to be faster (more interrupt like). We are therefore removing unnecessary delays while waiting to retry one sensor multiple times, and instead retrying the entire suite of sensors up to three times before failing that periodic reading event.

I was trying to add another driver with a long retry time, and this work was the result instead. See #564

This is unfinished, as currently it will evaluate all sensors again, instead only failing ones need be retried.

There will be a follow up PR to remove any unnecessary retries during I2C sensor data reads once this is merged.

tyeth commented 3 months ago

@brentru ready for review