mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
Update DHT.cpp
This commit is contained in:
parent
f771939337
commit
2dfa77993d
8
DHT.cpp
8
DHT.cpp
@ -89,7 +89,13 @@ float DHT::readHumidity(bool force) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//boolean isFahrenheit: True == Fahrenheit; False == Celcius
|
//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
|
// Using both Rothfusz and Steadman's equations
|
||||||
// http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml
|
// http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml
|
||||||
float hi;
|
float hi;
|
||||||
|
Loading…
Reference in New Issue
Block a user