mirror of https://github.com/arendst/Tasmota.git
Fix Dew Point is null
Fix Dew Point is null if either or both Temperature and/ot Humidity is null (#8411)
This commit is contained in:
parent
125ee62ff3
commit
001b6e4895
|
@ -638,7 +638,7 @@ float ConvertHumidity(float h)
|
||||||
|
|
||||||
float CalcTempHumToDew(float t, float h)
|
float CalcTempHumToDew(float t, float h)
|
||||||
{
|
{
|
||||||
if (isnan(h) || isnan(t)) { return 0.0; }
|
if (isnan(h) || isnan(t)) { return NAN; }
|
||||||
|
|
||||||
if (Settings.flag.temperature_conversion) { // SetOption8 - Switch between Celsius or Fahrenheit
|
if (Settings.flag.temperature_conversion) { // SetOption8 - Switch between Celsius or Fahrenheit
|
||||||
t = (t - 32) / 1.8; // Celsius
|
t = (t - 32) / 1.8; // Celsius
|
||||||
|
|
Loading…
Reference in New Issue