Merge pull request #1337 from ShameerAshraf/develop

Fixed Wind Chill and Heat Index for Kelvin
This commit is contained in:
Michael Teeuw 2018-06-30 21:03:19 +02:00 committed by GitHub
commit fdacf824b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Newsfeed now remembers to show the description when `"ARTICLE_LESS_DETAILS"` is called if the user wants to always show the description. [#1282](https://github.com/MichMich/MagicMirror/issues/1282)
- `clientonly/*.js` is now linted, and one linting error is fixed
- Fix issue #1196 by changing underscore to hyphen in locale id, in align with momentjs.
- Fixed issue where heat index and wind chill were reporting incorrect values in Kelvin. [#1263](https://github.com/MichMich/MagicMirror/issues/1263)
### Updated
- Updated Italian translation

View File

@ -417,7 +417,7 @@ Module.register("currentweather",{
case "imperial": this.feelsLike = windChillInF.toFixed(0);
break;
case "default":
var tc = windChillInC - 273.15;
var tc = windChillInC + 273.15;
this.feelsLike = tc.toFixed(0);
break;
}
@ -437,7 +437,7 @@ Module.register("currentweather",{
case "imperial": this.feelsLike = Hindex.toFixed(0);
break;
case "default":
var tc = Hindex - 273.15;
var tc = parseFloat((Hindex - 32) / 1.8) + 273.15;
this.feelsLike = tc.toFixed(0);
break;
}