Skip to content
Permalink
Browse files

поправлена установка значения яркости при использовании методов вкл. …

…откл
  • Loading branch information...
Alexandr-logrus committed Jul 7, 2019
1 parent b66a119 commit 3667feda066190e7f718e14148da44ac944450f7
@@ -58,7 +58,7 @@
$check = 1;
}
} else {
$this->setProperty('color', '000000');
$this->callmethodSafe('turnOff');
}
if ($check) {
@@ -1,3 +1,4 @@
<?php
$this->setProperty('brightnessSaved', $this->getProperty('brightness'));
$this->setProperty('color', '000000');
@@ -1,9 +1,14 @@
<?php
$colorSaved = $this->getProperty('colorSaved');
$brightnessHex = dechex($this->getProperty('brightnessSaved'));
if (strlen($brightnessHex) == '1') {
$brightnessHex = '0' . $brightnessHex;
}
if (isset($colorSaved) && $colorSaved != '000000') {
$this->setProperty('color', $colorSaved);
$this->setProperty('color', $brightnessHex . $colorSaved);
} else {
$this->setProperty('color', 'ffffff');
$this->setProperty('color', $brightnessHex . 'ffffff');
}

0 comments on commit 3667fed

Please sign in to comment.
You can’t perform that action at this time.