mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
36_LaCrosse.pm: WS 1600 - Fix for the rare case where a correct value was suppressed
git-svn-id: https://svn.fhem.de/fhem/trunk@8713 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5381afcf7e
commit
431ebdf691
@ -251,6 +251,7 @@ sub LaCrosse_Parse($$) {
|
||||
else {$typeName = "unknown";}
|
||||
}
|
||||
|
||||
|
||||
$battery_new = $bytes[13] & 0x01;
|
||||
$battery_low = $bytes[13] & 0x04;
|
||||
$error = $bytes[13] & 0x02;
|
||||
@ -259,7 +260,7 @@ sub LaCrosse_Parse($$) {
|
||||
|
||||
my $rh = $modules{LaCrosse}{defptr}{$addr};
|
||||
|
||||
if($bytes[2] != 0xFF && $bytes[3] != 0xFF) {
|
||||
if($bytes[2] != 0xFF) {
|
||||
$temperature = ($bytes[2]*256 + $bytes[3] - 1000)/10;
|
||||
$rh->{"bufferedT"} = $temperature;
|
||||
}
|
||||
@ -281,21 +282,21 @@ sub LaCrosse_Parse($$) {
|
||||
}
|
||||
}
|
||||
|
||||
if($bytes[5] != 0xFF && $bytes[6] != 0xFF) {
|
||||
if($bytes[5] != 0xFF) {
|
||||
$rain = ($bytes[5]*256 + $bytes[6]) * 0.5;
|
||||
}
|
||||
|
||||
if($bytes[7] != 0xFF && $bytes[8] != 0xFF) {
|
||||
if($bytes[7] != 0xFF) {
|
||||
$windDirection = ($bytes[7]*256 + $bytes[8]) / 10;
|
||||
}
|
||||
if($bytes[9] != 0xFF && $bytes[10] != 0xFF) {
|
||||
if($bytes[9] != 0xFF) {
|
||||
$windSpeed = ($bytes[9] * 256 + $bytes[10]) / 10;
|
||||
}
|
||||
if($bytes[11] != 0xFF && $bytes[12] != 0xFF) {
|
||||
if($bytes[11] != 0xFF) {
|
||||
$windGust = ($bytes[11] * 256 + $bytes[12]) / 10;
|
||||
}
|
||||
|
||||
if(@bytes > 15 && $bytes[14] != 0xFF && $bytes[15] != 0xFF) {
|
||||
|
||||
if(@bytes > 15 && $bytes[14] != 0xFF) {
|
||||
$pressure = $bytes[14] * 256 + $bytes[15];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user