mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
31_MilightDevice: Fixed incompatibility with Color::rgb2hsv
git-svn-id: https://svn.fhem.de/fhem/trunk@11177 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c54aa2401
commit
ea85a68358
@ -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: 31_MilightDevice: Fixed incompatibility with Color::rgb2hsv
|
||||
- feature: new module 37_fakeRoku.pm to control fhem from a harmony hub
|
||||
- feature: new module 52_I2C_MMA845X.pm added
|
||||
- change: 49_SSCAM: change to new RemoveInternalTimer for functions
|
||||
|
@ -440,7 +440,7 @@ sub MilightDevice_Set(@)
|
||||
$usage = "Usage: set $name rgb RRGGBB [seconds(0..x)] [flags(l=long path|q=don't clear queue)]";
|
||||
return $usage if ($args[0] !~ /^([0-9A-Fa-f]{1,2})([0-9A-Fa-f]{1,2})([0-9A-Fa-f]{1,2})$/);
|
||||
my( $r, $g, $b ) = (hex($1), hex($2), hex($3)); #change to color.pm?
|
||||
my( $h, $s, $v ) = Color::rgb2hsv($r,$g,$b);
|
||||
my( $h, $s, $v ) = Color::rgb2hsv($r/255.0,$g/255.0,$b/255.0);
|
||||
$h = MilightDevice_roundfunc($h * 360);
|
||||
$s = MilightDevice_roundfunc($s * 100);
|
||||
$v = MilightDevice_roundfunc($v * 100);
|
||||
|
Loading…
x
Reference in New Issue
Block a user