hackAir-Arduino icon indicating copy to clipboard operation
hackAir-Arduino copied to clipboard

[Wemos.ino] Failing DHT measurement not handled

Open dl1com opened this issue 7 years ago • 0 comments

In the current version of Wemos.ino, a failing DHT humidity reading (this happens from time to time, or, there is simply no DHT sensor attached) is not handled. The humidity compensation is conducted with a humidity value of NaN, which yields NaN. data.error is not updated and stays at 0.

The success of the DHT humidity reading should be checked, and no humidity compensation should be done when there is no valid humidity value available.

dl1com avatar Apr 01 '18 13:04 dl1com