Added optional timeout to all read functions.
Added optional timeout to all read functions to avoid infinite locks upon sensor failure or disconnection.
Thanks Jose, When do you see such conditions of sensor failure or disconnection occur? Does the I2C communication timeout if no sensor is attached?
Hi Felix, and thank you for sharing this project!
We had a problem of the uC getting locked in one of the data request methods when no sensor was connected... it's weird because I thought that I2C should be able to detect a lack of ACK (so perhaps the problem was raised by our particular hardware design), but without this patch the firmware always locked when a SI7021 sensor was not connected.
LowPowerLab you did the code review and instead of accepting the commit and submit your own version on top with the proposed fixes expected the original author to do that for you. He didn't. And now this necessary fail safe to this lib is pending for 5 months...