Update DHT.cpp

This commit is contained in:
Steven Conaway 2018-07-30 11:31:34 -07:00 committed by GitHub
parent f771939337
commit 2dfa77993d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,13 @@ float DHT::readHumidity(bool force) {
}
//boolean isFahrenheit: True == Fahrenheit; False == Celcius
float DHT::computeHeatIndex(float temperature, float percentHumidity, bool isFahrenheit) {
float DHT::computeHeatIndex(isFahrenheit) {
float hi = self.computeHeatIndex(self.readTemperature(isFahrenheit), self.readHumidity(), isFahrenheit);
return isFahrenheit ? hi : convertFtoC(hi);
}
//boolean isFahrenheit: True == Fahrenheit; False == Celcius
float DHT::computeHeatIndex(float temperature, floast percentHumidity, bool isFahrenheit) {
// Using both Rothfusz and Steadman's equations
// http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml
float hi;