mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
00_SIGNALduino.pm: Fixed ws7000 decoding
git-svn-id: https://svn.fhem.de/fhem/trunk@16573 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
23388b7c00
commit
a18009d0ae
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 00_SIGNALduino: fixed ws7000 decoding
|
||||
- feature: 72_XiaomiDevice: predefined zones and points
|
||||
- bugfix: 88_xs1Bridge: blacklist PEARL Warning + Code mod
|
||||
- feature: 74_AMADDevice: add support to set and read Adaptive brightness
|
||||
|
@ -4441,7 +4441,7 @@ sub SIGNALduino_postDemo_WS2000($@) {
|
||||
do {
|
||||
$error += !$bit_msg[$index + $datastart]; # jedes 5. Bit muss 1 sein
|
||||
$dataindex = $index + $datastart + 1;
|
||||
$data = oct( "0b".(join "", reverse @bit_msg[$dataindex .. $dataindex + 3])) if ($dataindex <= $datalength);
|
||||
$data = oct( "0b".(join "", reverse @bit_msg[$dataindex .. $dataindex + 3]));
|
||||
if ($index == 5) {$adr = ($data & 0x07)} # Sensoradresse
|
||||
if ($datalength == 45 || $datalength == 46) { # Typ 1 ohne Summe
|
||||
if ($index <= $datalength - 5) {
|
||||
@ -4454,7 +4454,7 @@ sub SIGNALduino_postDemo_WS2000($@) {
|
||||
}
|
||||
}
|
||||
$index += 5;
|
||||
} until ($index >= $datalength);
|
||||
} until ($index >= $datalength -1 );
|
||||
}
|
||||
if ($error != 0) {
|
||||
Log3 $name, 4, "$name: WS2000 Sensortyp $typ Adr $adr - ERROR examination bit";
|
||||
@ -4464,7 +4464,7 @@ sub SIGNALduino_postDemo_WS2000($@) {
|
||||
return (0, undef);
|
||||
} else {
|
||||
if ($datalength < 45 || $datalength > 46) { # Summe prüfen, außer Typ 1 ohne Summe
|
||||
$data = oct( "0b".(join "", reverse @bit_msg[$dataindex .. $dataindex + 3])) if ($dataindex <= $datalength);
|
||||
$data = oct( "0b".(join "", reverse @bit_msg[$dataindex .. $dataindex + 3]));
|
||||
if ($data != ($sum & 0x0F)) {
|
||||
Log3 $name, 4, "$name: WS2000 Sensortyp $typ Adr $adr - ERROR sum";
|
||||
return (0, undef);
|
||||
|
Loading…
x
Reference in New Issue
Block a user