2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 04:36:02 +00:00

10_CUL_HM: improve message counter calculation device dependant

git-svn-id: https://svn.fhem.de/fhem/trunk@8652 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2015-05-30 08:23:00 +00:00
parent 06e0f33350
commit d70ddf163d

View File

@ -1102,7 +1102,8 @@ sub CUL_HM_Parse($$) {#########################################################
$shash->{lastMsg} = $msgX;
delete $shash->{helper}{rpt};# new message, rm recent ack
my @ack; # ack and responses, might be repeated
$devH->{helper}{HM_CMDNR} = hex($mNo);
CUL_HM_DumpProtocol("RCV",$iohash,$len,$mNo,$mFlg,$mTp,$src,$dst,$p);
#----------start valid messages parsing ---------
@ -5582,8 +5583,8 @@ sub CUL_HM_SndCmd($$) {
my ($mn, $cmd2) = unpack 'A2A*',$cmd;
if($mn eq "++") {
$mn = $io->{HM_CMDNR} ? (($io->{HM_CMDNR} +1)&0xff) : 1;
$io->{HM_CMDNR} = $mn;
$mn = $hash->{helper}{HM_CMDNR} ? (($hash->{helper}{HM_CMDNR} +1)&0xff) : 1;
$hash->{helper}{HM_CMDNR} = $mn;
}
elsif($cmd =~ m/^[+-]/){; #continue pure
IOWrite($hash, "", $cmd);