mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 11:16:36 +00:00
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:
parent
16c0e3a89f
commit
2c44fafbba
fhem/FHEM
@ -264,7 +264,7 @@ RFXCOM_Read($)
|
||||
|
||||
# first char as byte represents number of bits of the message
|
||||
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) {
|
||||
# the buffer contains at least the number of bytes we need
|
||||
|
@ -610,7 +610,7 @@ OREGON_Parse($$)
|
||||
}
|
||||
|
||||
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 $type2 = $rfxcom_data_array[1];
|
||||
@ -719,7 +719,7 @@ OREGON_Parse($$)
|
||||
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{forecast};;
|
||||
}
|
||||
case "speed" {
|
||||
#$val .= "W: ".$i->{current}." ";
|
||||
$val .= "W: ".$i->{current}." ";
|
||||
|
||||
$sensor = "wind_speed";
|
||||
$def->{READINGS}{$sensor}{TIME} = $tm;
|
||||
@ -727,7 +727,7 @@ OREGON_Parse($$)
|
||||
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};;
|
||||
}
|
||||
case "direction" {
|
||||
#$val .= "WD: ".$i->{current}." ";
|
||||
$val .= "WD: ".$i->{current}." ";
|
||||
|
||||
$sensor = "wind_dir";
|
||||
$def->{READINGS}{$sensor}{TIME} = $tm;
|
||||
@ -735,7 +735,7 @@ OREGON_Parse($$)
|
||||
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};;
|
||||
}
|
||||
case "rain" {
|
||||
#$val .= "RR: ".$i->{current}." ";
|
||||
$val .= "RR: ".$i->{current}." ";
|
||||
|
||||
$sensor = "rain_rate";
|
||||
$def->{READINGS}{$sensor}{TIME} = $tm;
|
||||
@ -743,7 +743,7 @@ OREGON_Parse($$)
|
||||
$def->{CHANGED}[$n++] = $sensor . ": " . $i->{current};;
|
||||
}
|
||||
case "train" {
|
||||
#$val .= "TR: ".$i->{current}." ";
|
||||
$val .= "TR: ".$i->{current}." ";
|
||||
|
||||
$sensor = "rain_total";
|
||||
$def->{READINGS}{$sensor}{TIME} = $tm;
|
||||
|
Loading…
x
Reference in New Issue
Block a user