14_CUL_TCM97001.pm: Fix checksum calculation for GT_WT_02
git-svn-id: https://svn.fhem.de/fhem/trunk@12742 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 14_CUL_TCM97001: Fix checksum calculation for GT_WT_02
|
||||||
- change: 10_IT: Implementation for HE800 de-/encoding
|
- change: 10_IT: Implementation for HE800 de-/encoding
|
||||||
Implementation for HE800 dimmer
|
Implementation for HE800 dimmer
|
||||||
Fix wrong return values
|
Fix wrong return values
|
||||||
|
|||||||
@@ -202,9 +202,10 @@ sub checkCRC_Mebus {
|
|||||||
sub checkCRC_GTWT02 {
|
sub checkCRC_GTWT02 {
|
||||||
my $msg = shift;
|
my $msg = shift;
|
||||||
my @a = split("", $msg);
|
my @a = split("", $msg);
|
||||||
|
|
||||||
my $CRC = (hex($a[0])+hex($a[1])+hex($a[2])+hex($a[3])
|
my $CRC = (hex($a[0])+hex($a[1])+hex($a[2])+hex($a[3])
|
||||||
+hex($a[4])+hex($a[5])+hex($a[6])+hex($a[7])) -1;
|
+hex($a[4])+hex($a[5])+hex($a[6])+(hex($a[7]) & 0xE));
|
||||||
|
# my $CRC = (hex($a[0])+hex($a[1])+hex($a[2])+hex($a[3])
|
||||||
|
# +hex($a[4])+hex($a[5])+hex($a[6])+hex($a[7])) -1;
|
||||||
my $CRCCHECKVAL= (hex($a[7].$a[8].$a[9]) & 0x1F8) >> 3;
|
my $CRCCHECKVAL= (hex($a[7].$a[8].$a[9]) & 0x1F8) >> 3;
|
||||||
if ($CRC == $CRCCHECKVAL) {
|
if ($CRC == $CRCCHECKVAL) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1247,6 +1248,8 @@ CUL_TCM97001_Parse($$)
|
|||||||
|
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
=item summary This module interprets temperature sensor messages.
|
||||||
|
=item summary_DE Module verarbeitet empfangene Nachrichten von Temp-Sensoren.
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="CUL_TCM97001"></a>
|
<a name="CUL_TCM97001"></a>
|
||||||
|
|||||||
Reference in New Issue
Block a user