From fcd0fb0c52621c875f36c1478e6b6b30cff7fbb5 Mon Sep 17 00:00:00 2001 From: LordGrey <48840279+Lord-Grey@users.noreply.github.com> Date: Tue, 14 Dec 2021 07:55:34 +0100 Subject: [PATCH] Fix #967 (#1378) * Fix #967 * Start Smoothing in pause mode to avoid resource usage, if hyperion is started without active priority * Update Changelog --- CHANGELOG.md | 3 +++ libsrc/hyperion/Hyperion.cpp | 3 +++ libsrc/hyperion/LinearColorSmoothing.cpp | 5 ----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49750fd6..5aab5892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Colors Smoothing is started in pause mode to save resources, when Hyperion starts with no active source + ### Fixed +- Fixes that the Led-Device output flow was interrupted, by an enabling API request on an already enabled device (#967 - Yeelight - Workaround: Ignore error when setting music mode = off, but the music-mode is already off (#1372) - Standalone grabbers: Improved fps help/error text, fixed default address and port diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 077798ea..b7e7dd6b 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -124,6 +124,9 @@ void Hyperion::start() _deviceSmooth = new LinearColorSmoothing(getSetting(settings::SMOOTHING), this); connect(this, &Hyperion::settingsChanged, _deviceSmooth, &LinearColorSmoothing::handleSettingsUpdate); + //Start in pause mode, a new priority will activate smoothing (either start-effect or grabber) + _deviceSmooth->setPause(true); + // create the message forwarder only on main instance if (_instIndex == 0) { diff --git a/libsrc/hyperion/LinearColorSmoothing.cpp b/libsrc/hyperion/LinearColorSmoothing.cpp index 7d244bee..afb0f47d 100644 --- a/libsrc/hyperion/LinearColorSmoothing.cpp +++ b/libsrc/hyperion/LinearColorSmoothing.cpp @@ -539,11 +539,6 @@ void LinearColorSmoothing::clearQueuedColors() void LinearColorSmoothing::componentStateChange(hyperion::Components component, bool state) { - if (component == hyperion::COMP_LEDDEVICE) - { - clearQueuedColors(); - } - if (component == hyperion::COMP_SMOOTHING) { setEnable(state);