mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
89_VCONTROL: 0x05 allowed for more Methods
git-svn-id: https://svn.fhem.de/fhem/trunk@11162 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
778fbf68d9
commit
bb2267fa6d
@ -483,7 +483,13 @@ VCONTROL_Read($)
|
||||
my $bufflen = length($hexline);
|
||||
my $buffhalflen = $bufflen/2;
|
||||
|
||||
if ( $bufflen > 2 && $hexline =~ /(05){$buffhalflen,}/ && $cmd_list[$last_cmd][2] ne "mode"){
|
||||
if ( $bufflen > 2 && $hexline =~ /(05){$buffhalflen,}/
|
||||
&& $cmd_list[$last_cmd][2] ne "mode"
|
||||
&& $cmd_list[$last_cmd][2] ne "1ByteU"
|
||||
&& $cmd_list[$last_cmd][2] ne "1ByteU2"
|
||||
&& $cmd_list[$last_cmd][2] ne "1ByteS"
|
||||
&& $cmd_list[$last_cmd][2] ne "1ByteH"
|
||||
){
|
||||
Log3 $name, 5, "VCONTROL: exit if buffer just filled with 0x05";
|
||||
$hash->{PARTIAL} = "";
|
||||
$read_now = READ_UNDEF;
|
||||
@ -533,7 +539,15 @@ VCONTROL_Read($)
|
||||
}
|
||||
#if the mode is requestet and 0x05 is received
|
||||
#try again to be sure that 0x05 is not the sync byte
|
||||
elsif ($poll_now == POLL_ACTIVE && $cmd_list[$last_cmd][2] eq "mode" && substr("$hexline",0,2) eq "05" ){
|
||||
elsif ( $poll_now == POLL_ACTIVE
|
||||
&& substr("$hexline",0,2) eq "05"
|
||||
&& ( $cmd_list[$last_cmd][2] eq "mode"
|
||||
|| $cmd_list[$last_cmd][2] eq "1ByteU"
|
||||
|| $cmd_list[$last_cmd][2] eq "1ByteU2"
|
||||
|| $cmd_list[$last_cmd][2] eq "1ByteS"
|
||||
|| $cmd_list[$last_cmd][2] eq "1ByteH"
|
||||
)
|
||||
){
|
||||
Log3 $name, 5, "VCONTROL: check temp_mode";
|
||||
if ($temp_mode < 5){
|
||||
$temp_mode++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user