-
Notifications
You must be signed in to change notification settings - Fork 13
Celsius/Farenheit behavior clarification #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can checkout source file of this library. It's quite simple. This source file shows that there is no some special hardware dependencies. Just in case of flag equal to https://github.com./adafruit/DHT-sensor-library/blob/master/DHT.cpp I'm agree with you that it's strange. It's will be much better to just have one default measurement system. You can send pull request to the author of the lib. But they can reject you pull cos afraid breaking backward compatibility. I can add this library right to the sources of the starter projects in this repo. But I don't wanna cos I want people to try to use PlatformIO's package manager. |
Thanks for the clarification. I saw the library sources but thought that it is rather me who does not understand something than a reasonless weirdness of the API. I think I am going to make a PR into library, hope they (as well as Platform is) use semver, so breaking changes will not affect those who use older major versions. |
As to husky-dev/firebase-iot-codelab#3 there is a strange design when temperature is read in Celsius by default and heatIndex is computed in Farenheit by default. This commit sets the default unit to Celsius for calculating heatIndex.
I'd like to clarify about DHT library which is used in this codelab.
Following the temperature sensor guide I noticed that by default we read the temperature in Celsius and have to pass an additional boolean flag in order to retrieve temperature in Farenheit.
However while calculating heat index by default it is assumed that temperature is in Farenheit, and in order to calculate it for Celsius we need to pass an additional flag.
Do you have any idea about why the API is designed that way? (mb some hardware internals requre that, etc?)
Thanks in advance
The text was updated successfully, but these errors were encountered: