Skip to content
Snippets Groups Projects
Commit 5f0a824b authored by jkerdreu's avatar jkerdreu
Browse files

round km/h

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@1999 b32b6428-25c9-4566-ad07-03861ab6144f
parent 30e99a5d
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ class GW:
self.devs[1].attributes['humidity'] = weather.get_humidity()
self.devs[2].attributes['pressure'] = weather.get_pressure().get('press',None)
wind = weather.get_wind().get('speed',None)
if wind: wind = wind * 3600 / 1000 # m/s => km/h
if wind: wind = round(wind * 3600 / 1000, 1) # m/s => km/h
self.devs[3].attributes['windStrength'] = wind
self.devs[3].attributes['windAngle'] = weather.get_wind().get('deg',None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment