DHT-sensor-library
DHT-sensor-library copied to clipboard
Fix api inconsistency about temperature units
Problem
When we read temperature the default units are Celsius and to get Fahrenheit we need to pass an additional flag. On the other hand heat index is calculated in Fahrenheit by default and there is a need to pass an additional boolean flag to retrieve a value in Celsius. See snipter/firebase-iot-codelab#3.
Description
This PR fixes the inconsistency by setting the default units to Celsius. Alongside this a little naming improvement has been done to make the purpose of flags in readTemperature more clear.
Limitations
Introduced changes are API-breaking, so a major version should be incremented in the release which will contain this patch.
This PR is now quite old, so I don't really expect it to be merged, but I agree with its spirit and came here to fix the same issue. It would be nice to have unit consistency, with Celsius as defalt everywhere.