lights: fix changing channel value while state is the same

This commit is contained in:
Maxim Prokhorov
2021-02-06 05:53:31 +03:00
parent 0f723b0248
commit b35a565126

View File

@@ -741,8 +741,7 @@ public:
private:
bool isImmediateTransition(bool state, float diff) {
return (!_time || (_step >= _time) || (std::abs(diff) <= std::numeric_limits<float>::epsilon())
|| (!state && (diff > 0.0)) || (state && (diff < 0.0)));
return (!_time || (_step >= _time) || (std::abs(diff) <= std::numeric_limits<float>::epsilon()));
}
std::vector<Transition> _transitions;