mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Small performance improvement if off on black is true.
Former-commit-id: dc69a21681432bef540c396847d64b07fa0bbb09
This commit is contained in:
parent
a1d489f62f
commit
4f7524d8de
@ -166,10 +166,6 @@ int LedDevicePhilipsHue::write(const std::vector<ColorRgb> & ledValues) {
|
|||||||
CiColor xy = lamp.rgbToCiColor(color.red / 255.0f, color.green / 255.0f, color.blue / 255.0f);
|
CiColor xy = lamp.rgbToCiColor(color.red / 255.0f, color.green / 255.0f, color.blue / 255.0f);
|
||||||
// Write color if color has been changed.
|
// Write color if color has been changed.
|
||||||
if (xy != lamp.color) {
|
if (xy != lamp.color) {
|
||||||
// Switch on if the lamp has been previously switched off.
|
|
||||||
if (switchOffOnBlack && lamp.color == lamp.black) {
|
|
||||||
put(getStateRoute(lamp.id), QString("{\"on\": true}"));
|
|
||||||
}
|
|
||||||
// Send adjust color and brightness command in JSON format.
|
// Send adjust color and brightness command in JSON format.
|
||||||
// We have to set the transition time each time.
|
// We have to set the transition time each time.
|
||||||
put(getStateRoute(lamp.id),
|
put(getStateRoute(lamp.id),
|
||||||
|
Loading…
Reference in New Issue
Block a user