mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
36_Shelly.pm: Bugfix roller mode
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19923 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9e6c7096f5
commit
9d1c68a09f
@ -39,7 +39,7 @@ use vars qw{%attr %defs};
|
|||||||
sub Log($$);
|
sub Log($$);
|
||||||
|
|
||||||
#-- globals on start
|
#-- globals on start
|
||||||
my $version = "2.04";
|
my $version = "2.05";
|
||||||
|
|
||||||
#-- these we may get on request
|
#-- these we may get on request
|
||||||
my %gets = (
|
my %gets = (
|
||||||
@ -585,7 +585,7 @@ sub Shelly_Set ($@) {
|
|||||||
$max = 20;
|
$max = 20;
|
||||||
}
|
}
|
||||||
$time = int(abs($targetpct-$pct)/100*$max);
|
$time = int(abs($targetpct-$pct)/100*$max);
|
||||||
$cmd = "?go=to_pos&roller_pos=".$targetpct;
|
$cmd = "?go=to_pos&roller_pos=" . ($pctnormal ? $targetpct : 100 - $targetpct);
|
||||||
$hash->{MOVING} = $pctnormal ? (($targetpct > $pct) ? "moving_up" : "moving_down") : (($targetpct > $pct) ? "moving_down" : "moving_up");
|
$hash->{MOVING} = $pctnormal ? (($targetpct > $pct) ? "moving_up" : "moving_down") : (($targetpct > $pct) ? "moving_down" : "moving_up");
|
||||||
|
|
||||||
$hash->{DURATION} = $time;
|
$hash->{DURATION} = $time;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user