Fixed the weather widget, wind km/h was broken.

This commit is contained in:
Adrian C. (anrxc) 2009-08-05 21:58:04 +02:00
parent 4c74de711f
commit 2d0cbf562e
1 changed files with 5 additions and 4 deletions

View File

@ -65,10 +65,11 @@ function worker(format, station)
string.match(ws, "Relative[%s]Humidity:[%s]([%d]+)%%") or weather["{humid}"]
weather["{press}"] = -- Pressure in hPa
string.match(ws, "Pressure[%s].+%((.+)[%s]hPa%)") or weather["{press}"]
weather["{windkmh}"] = -- Wind speed in KMH if MPH was available
if weather["{windmph}"] ~= "N/A" then
weather["{windkmh}"] = math.floor(weather["{windmph}"] * 1.6)
end
-- Wind speed in KMH if MPH was available
if weather["{windmph}"] ~= "N/A" then
weather["{windkmh}"] = math.floor(weather["{windmph}"] * 1.6)
end
end
return weather