2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 23:09:26 +00:00

YAMAHA_AVR: fixing not working volume smoothing (forgot about point before line calculation, Forum: #45799)

git-svn-id: https://svn.fhem.de/fhem/trunk@10189 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2015-12-16 21:48:54 +00:00
parent 23bad2f845
commit 3fcaa33653
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# 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.
- bugfix: YAMAHA_AVR: fixing not correctly volume smoothing
- change: 49_SSCam: turned completly to HttpUtils_NonblockingGet for
calling websites nonblocking,
LWP is not needed anymore,

View File

@ -446,7 +446,7 @@ YAMAHA_AVR_Set($@)
if(AttrVal($name, "volume-smooth-change", "0") eq "1")
{
my $steps = AttrVal($name, "volume-smooth-steps", 5);
my $diff = int($target_volume - ReadingsVal($name, "volumeStraight", $target_volume) / $steps / 0.5) * 0.5;
my $diff = int(($target_volume - ReadingsVal($name, "volumeStraight", $target_volume)) / $steps / 0.5) * 0.5;
my $current_volume = ReadingsVal($name, "volumeStraight", undef);
if($diff > 0)