Skip to content

Commit 2dfa779

Browse files
authored
Update DHT.cpp
1 parent f771939 commit 2dfa779

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

DHT.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ float DHT::readHumidity(bool force) {
8989
}
9090

9191
//boolean isFahrenheit: True == Fahrenheit; False == Celcius
92-
float DHT::computeHeatIndex(float temperature, float percentHumidity, bool isFahrenheit) {
92+
float DHT::computeHeatIndex(isFahrenheit) {
93+
float hi = self.computeHeatIndex(self.readTemperature(isFahrenheit), self.readHumidity(), isFahrenheit);
94+
return isFahrenheit ? hi : convertFtoC(hi);
95+
}
96+
97+
//boolean isFahrenheit: True == Fahrenheit; False == Celcius
98+
float DHT::computeHeatIndex(float temperature, floast percentHumidity, bool isFahrenheit) {
9399
// Using both Rothfusz and Steadman's equations
94100
// http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml
95101
float hi;

0 commit comments

Comments
 (0)