mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +00:00
10_ZWave.pm: revert previous patch, proposing a new one (Forum #79659)
git-svn-id: https://svn.fhem.de/fhem/trunk@15440 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ebaf24f8d1
commit
5d94b511b9
@ -1481,12 +1481,13 @@ ZWave_thermostatSetpointParse ($$)
|
|||||||
my $scale = (((hex($2) & 0x18)>>3) == 1) ? "F": "C";
|
my $scale = (((hex($2) & 0x18)>>3) == 1) ? "F": "C";
|
||||||
my $size = (hex($2) & 0x07);
|
my $size = (hex($2) & 0x07);
|
||||||
|
|
||||||
my $sp = hex($3);
|
if (length($3) < $size*2) {
|
||||||
if(length($3) != $size*2) {
|
Log3 $name, 1, "$name: THERMOSTAT_SETPOINT_REPORT "
|
||||||
$sp = ($sp & 0xfff0000) >> 16; #79659, Temporary?
|
."wrong number of bytes received";
|
||||||
} else {
|
return;
|
||||||
$sp -= (2 ** ($size*8)) if($sp >= (2 ** ($size*8-1)));
|
|
||||||
}
|
}
|
||||||
|
my $sp = hex(substr($3,0,$size*2)); # 79659
|
||||||
|
$sp -= (2 ** ($size*8)) if $sp >= (2 ** ($size*8-1));
|
||||||
$sp = $sp / (10 ** $prec);
|
$sp = $sp / (10 ** $prec);
|
||||||
|
|
||||||
# output temperature with variable decimals as reported (according to $prec)
|
# output temperature with variable decimals as reported (according to $prec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user