mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
10_CUL_HM:change count for longRelease - do not count the release
git-svn-id: https://svn.fhem.de/fhem/trunk@14626 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
13a8453114
commit
c3c828b8f0
@ -2843,7 +2843,7 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
$stAck = '01'.$dChNo.(($stT eq "ON")?"C8":"00")."00"
|
||||
}
|
||||
|
||||
if ($mh{mFlgH} & 0x20){
|
||||
if ((($mh{mFlgH} & 0x24) == 0x20)){
|
||||
$longPress .= "_Release";
|
||||
$dChHash->{helper}{trgLgRpt}=0;
|
||||
push @ack,$mh{shash},$mh{mNo}."8002".$mh{dst}.$mh{src}.$stAck;
|
||||
@ -3430,10 +3430,13 @@ sub CUL_HM_parseCommon(@){#####################################################
|
||||
$mhp->{cHash}{helper}{BNO} = $cnt;
|
||||
$mhp->{cHash}{helper}{BNOCNT} = 0; # message counter reset
|
||||
}
|
||||
if (($mhp->{mFlgH} & 0x24) == 0x20 && ($long eq "long")){ # release long press
|
||||
$state .= "Release";
|
||||
}
|
||||
else{ # continue long press
|
||||
$mhp->{cHash}{helper}{BNOCNT} += 1;
|
||||
#$state .= ($mhp->{mFlgH} & 0x20 ? "Release" : "")." $mhp->{cHash}{helper}{BNOCNT}_$cnt" # not sufficient
|
||||
$state .= ((($mhp->{mFlgH} & 0x24) == 0x20) ? "Release" : "")." $mhp->{cHash}{helper}{BNOCNT}_$cnt"
|
||||
if($long eq "long");
|
||||
}
|
||||
$state .= " $mhp->{cHash}{helper}{BNOCNT}_$cnt";
|
||||
|
||||
push @evtEt,[$mhp->{cHash},1,"trigger:".(ucfirst($long))."_$cnt"];
|
||||
push @evtEt,[$mhp->{cHash},1,"state:".$state." (to $mhp->{dstN})"] if ($mhp->{devH} ne $mhp->{cHash});
|
||||
|
Loading…
x
Reference in New Issue
Block a user