Skip to content

Commit

Permalink
FIx wind chill in Fahrenheit.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichMich committed Apr 2, 2018
1 parent 4daf2e4 commit 10eb41d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed

### Fixed
- Fixed issue where wind chill could not be displayed in Fahrenheit. [#1247](https://github.com/MichMich/MagicMirror/issues/1247)

### Updated
- Updated italian translation
Expand Down
4 changes: 2 additions & 2 deletions modules/default/currentweather/currentweather.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ Module.register("currentweather",{

if (windInMph > 3 && tempInF < 50){
// windchill
var windchillinF = Math.round(35.74+0.6215*tempInF-35.75*Math.pow(windInMph,0.16)+0.4275*tempInF*Math.pow(windInMph,0.16));
var windChillInC = (windchillinF - 32) * (5/9);
var windChillInF = Math.round(35.74+0.6215*tempInF-35.75*Math.pow(windInMph,0.16)+0.4275*tempInF*Math.pow(windInMph,0.16));
var windChillInC = (windChillInF - 32) * (5/9);
// this.feelsLike = windChillInC.toFixed(0);

switch (this.config.units){
Expand Down

1 comment on commit 10eb41d

@parnic
Copy link
Contributor

@parnic parnic commented on 10eb41d Apr 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, this was preventing the currentweather module from working at all in the Midori browser on my Raspberry Pi Zero W once I upgraded from MM 2.2.2 to 2.3.1. Once it hit this error, it stopped processing the module and I was stuck with "loading..." on the mirror.

Please sign in to comment.