correct num_bytes after adding PCR800

git-svn-id: https://svn.fhem.de/fhem/trunk@704 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig
2010-08-16 19:59:54 +00:00
parent bbfc8d05db
commit 2069e0392e
2 changed files with 6 additions and 6 deletions

View File

@@ -264,7 +264,7 @@ RFXCOM_Read($)
# first char as byte represents number of bits of the message # first char as byte represents number of bits of the message
my $bits = ord($rfxcom_data); my $bits = ord($rfxcom_data);
my $num_bytes = $bits >> 3; my $num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
while(length($rfxcom_data) > $num_bytes) { while(length($rfxcom_data) > $num_bytes) {
# the buffer contains at least the number of bytes we need # the buffer contains at least the number of bytes we need

View File

@@ -610,7 +610,7 @@ OREGON_Parse($$)
} }
my $bits = ord($msg); my $bits = ord($msg);
my $num_bytes = $bits >> 3; my $num_bytes = $bits >> 3; if (($bits & 0x7) != 0) { $num_bytes++; }
my $type1 = $rfxcom_data_array[0]; my $type1 = $rfxcom_data_array[0];
my $type2 = $rfxcom_data_array[1]; my $type2 = $rfxcom_data_array[1];
@@ -719,7 +719,7 @@ OREGON_Parse($$)
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{forecast};; $def->{CHANGED}[$n++] = $sensor . ": " . $i->{forecast};;
} }
case "speed" { case "speed" {
#$val .= "W: ".$i->{current}." "; $val .= "W: ".$i->{current}." ";
$sensor = "wind_speed"; $sensor = "wind_speed";
$def->{READINGS}{$sensor}{TIME} = $tm; $def->{READINGS}{$sensor}{TIME} = $tm;
@@ -727,7 +727,7 @@ OREGON_Parse($$)
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};; $def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};;
} }
case "direction" { case "direction" {
#$val .= "WD: ".$i->{current}." "; $val .= "WD: ".$i->{current}." ";
$sensor = "wind_dir"; $sensor = "wind_dir";
$def->{READINGS}{$sensor}{TIME} = $tm; $def->{READINGS}{$sensor}{TIME} = $tm;
@@ -735,7 +735,7 @@ OREGON_Parse($$)
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};; $def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};;
} }
case "rain" { case "rain" {
#$val .= "RR: ".$i->{current}." "; $val .= "RR: ".$i->{current}." ";
$sensor = "rain_rate"; $sensor = "rain_rate";
$def->{READINGS}{$sensor}{TIME} = $tm; $def->{READINGS}{$sensor}{TIME} = $tm;
@@ -743,7 +743,7 @@ OREGON_Parse($$)
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};; $def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};;
} }
case "train" { case "train" {
#$val .= "TR: ".$i->{current}." "; $val .= "TR: ".$i->{current}." ";
$sensor = "rain_total"; $sensor = "rain_total";
$def->{READINGS}{$sensor}{TIME} = $tm; $def->{READINGS}{$sensor}{TIME} = $tm;