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

◆ isActive()

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

Implements fl::TimeAlpha.

Definition at line 99 of file time_alpha.h.

99 {
100 bool not_started = (mEnd == 0) && (mStart == 0);
101 if (not_started) {
102 // if we have not started, we are not active
103 return false;
104 }
105 if (now < mStart) {
106 // if the time is before the start, we are not active
107 return false;
108 }
109 if (now > mEnd) {
110 // if the time is after the finished rising, we are not active
111 return false;
112 }
113 return true;
114 }
uint32_t mEnd
Definition time_alpha.h:129
uint32_t mStart
Definition time_alpha.h:127

References mEnd, and mStart.