FastLED 3.9.15
Loading...
Searching...
No Matches

◆ isActive()

bool fl::TimeClampedTransition::isActive ( uint32_t now) const
inlineoverridevirtual

Implements fl::TimeAlpha.

Definition at line 111 of file time_alpha.h.

111 {
112 bool not_started = (mEnd == 0) && (mStart == 0);
113 if (not_started) {
114 // if we have not started, we are not active
115 return false;
116 }
117 if (now < mStart) {
118 // if the time is before the start, we are not active
119 return false;
120 }
121 if (now > mEnd) {
122 // if the time is after the finished rising, we are not active
123 return false;
124 }
125 return true;
126 }

References mEnd, and mStart.