From b35a56512634f1470fa5784dfb9e8fedfa5d0b4f Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Sat, 6 Feb 2021 05:53:31 +0300 Subject: [PATCH] lights: fix changing channel value while state is the same --- code/espurna/light.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/espurna/light.cpp b/code/espurna/light.cpp index 13117ff9..1e5ea315 100644 --- a/code/espurna/light.cpp +++ b/code/espurna/light.cpp @@ -741,8 +741,7 @@ public: private: bool isImmediateTransition(bool state, float diff) { - return (!_time || (_step >= _time) || (std::abs(diff) <= std::numeric_limits::epsilon()) - || (!state && (diff > 0.0)) || (state && (diff < 0.0))); + return (!_time || (_step >= _time) || (std::abs(diff) <= std::numeric_limits::epsilon())); } std::vector _transitions;