Browse Source

lights: fix changing channel value while state is the same

mcspr-patch-1
Maxim Prokhorov 3 years ago
parent
commit
b35a565126
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      code/espurna/light.cpp

+ 1
- 2
code/espurna/light.cpp View File

@ -741,8 +741,7 @@ public:
private: private:
bool isImmediateTransition(bool state, float diff) { 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; std::vector<Transition> _transitions;


Loading…
Cancel
Save