correct winddirname

git-svn-id: https://svn.fhem.de/fhem/trunk@4777 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig
2014-01-31 21:48:28 +00:00
parent 20960799ad
commit ff7b4bbe95

View File

@@ -395,7 +395,7 @@ sub TRX_WEATHER_common_anemometer {
}
my $dir = $bytes->[5]*256 + $bytes->[6];
my $dirname = $TRX_WEATHER_winddir_name[$dir/22.5];
my $dirname = $TRX_WEATHER_winddir_name[int((($dir + 11.25) % 360) / 22.5)];
my $avspeed = ($bytes->[7]*256 + $bytes->[8]) / 10;
my $speed = ($bytes->[9]*256 + $bytes->[10]) / 10;