From d6fe5ab4174cd113b25e9076b4beb2b08947eefb Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 17 Apr 2018 19:40:00 -0500 Subject: [PATCH 1/2] Fixed heat index Celsius and Fahrenheit were flipped. The index was computed in Fahrenheit but used as if it were Celsius. --- modules/default/currentweather/currentweather.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index b0ab40dc..106b7920 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -432,9 +432,9 @@ Module.register("currentweather",{ - 1.99*Math.pow(10,-6)*tempInF*tempInF*this.humidity*this.humidity; switch (this.config.units){ - case "metric": this.feelsLike = Hindex.toFixed(0); + case "metric": this.feelsLike = parseFloat((Hindex - 32) / 1.8).toFixed(0); break; - case "imperial": this.feelsLike = parseFloat(Hindex * 1.8 + 32).toFixed(0); + case "imperial": this.feelsLike = Hindex.toFixed(0); break; case "default": var tc = Hindex - 273.15; From 4abd7301fdebecaf3d943e5fae193399b5799506 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 17 Apr 2018 19:45:12 -0500 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81665ebb..07b9248a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed issues where a module crashes when it tries to dismiss a non existing alert. [#1240](https://github.com/MichMich/MagicMirror/issues/1240) - In default module currentWeather/currentWeather.js line 296, 300, self.config.animationSpeed can not be found because the notificationReceived function does not have "self" variable. - Fixed browser-side code to work on the Midori browser. +- Fixed issue where heat index was reporting incorrect values in Celsius and Fahrenheit. [#1263](https://github.com/MichMich/MagicMirror/issues/1263) ### Updated - Updated Italian translation