From 2dfa77993d7a17a130b793a41ea0ffe4fa2aeca9 Mon Sep 17 00:00:00 2001 From: Steven Conaway Date: Mon, 30 Jul 2018 11:31:34 -0700 Subject: [PATCH] Update DHT.cpp --- DHT.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DHT.cpp b/DHT.cpp index fb9e9df..9f154d5 100644 --- a/DHT.cpp +++ b/DHT.cpp @@ -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;