Skip to content

Commit

Permalink
Merge pull request #53 from cmfcmf/fix-wind-direction
Browse files Browse the repository at this point in the history
Fix wind direction retrieval, closes #52.
  • Loading branch information
cmfcmf committed Jan 31, 2016
2 parents 468a991 + ea06037 commit 78a8675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cmfcmf/OpenWeatherMap/Forecast.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct(\SimpleXMLElement $xml, $units)
$windSpeedUnit = 'mps';
}

$this->wind = new Wind(new Unit($xml->windSpeed['mps'], $windSpeedUnit, $xml->windSpeed['name']), new Unit($xml->windDirection['value'], $xml->windDirection['code'], $xml->windDirection['name']));
$this->wind = new Wind(new Unit($xml->windSpeed['mps'], $windSpeedUnit, $xml->windSpeed['name']), new Unit($xml->windDirection['deg'], $xml->windDirection['code'], $xml->windDirection['name']));
$this->clouds = new Unit($xml->clouds['all'], $xml->clouds['unit'], $xml->clouds['value']);
$this->precipitation = new Unit($xml->precipitation['value'], null, $xml->precipitation['type']);
$this->sun = new Sun(new \DateTime($xml->city->sun['rise']), new \DateTime($xml->city->sun['set']));
Expand Down

0 comments on commit 78a8675

Please sign in to comment.