Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevents Perl warning WS2000 #1083

Merged
merged 2 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FHEM/lib/SD_ProtocolData.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,7 @@ package lib::SD_ProtocolData;
one => [3,-7],
zero => [7,-3],
clockabs => 122,
reconstructBit => '1',
preamble => 'K',
postamble => '',
clientmodule => 'CUL_WS',
Expand Down
5 changes: 5 additions & 0 deletions FHEM/lib/SD_Protocols.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,11 @@ sub postDemo_WS2000 {
return (0, undef);
}
$dataindex = $index + $datastart + 1;
my $rest = $protolength - $dataindex;
if ($rest < 4) {
$self->_logging(qq[lib/postDemo_WS2000, Sensortyp $typ - ERROR rest of message < 4 ($rest)],4);
return (0, undef);
}
$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
Expand Down
4 changes: 2 additions & 2 deletions controls_signalduino.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ UPD 2021-08-11_21:38:30 35313 FHEM/14_SD_WS09.pm
UPD 2020-04-13_23:15:56 14325 FHEM/14_SD_WS_Maverick.pm
UPD 2021-08-11_21:38:30 37904 FHEM/41_OREGON.pm
UPD 2020-12-17_23:16:30 15582 FHEM/90_SIGNALduino_un.pm
UPD 2022-03-06_20:47:38 228506 FHEM/lib/SD_ProtocolData.pm
UPD 2022-02-02_17:39:43 75787 FHEM/lib/SD_Protocols.pm
UPD 2022-03-07_17:35:38 228539 FHEM/lib/SD_ProtocolData.pm
UPD 2022-03-07_17:35:38 75991 FHEM/lib/SD_Protocols.pm