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

◆ isActive()

bool fl::TimeRamp::isActive ( u32 now) const
overridevirtual
Returns
true iff we're still within the latch period.

Implements fl::TimeAlpha.

Definition at line 44 of file time_alpha.cpp.hpp.

44 {
45
46 bool not_started = (mFinishedRisingTime == 0) &&
47 (mFinishedPlateauTime == 0) &&
49 if (not_started) {
50 // if we have not started, we are not active
51 return false;
52 }
53
54 if (now < mStart) {
55 // if the time is before the start, we are not active
56 return false;
57 }
58
59 if (now > mFinishedFallingTime) {
60 // if the time is after the finished rising, we are not active
61 return false;
62 }
63
64 return true;
65}
u32 mFinishedPlateauTime
Definition time_alpha.h:94
u32 mFinishedRisingTime
Definition time_alpha.h:93
u32 mFinishedFallingTime
Definition time_alpha.h:95

References FL_NOEXCEPT, mFinishedFallingTime, mFinishedPlateauTime, mFinishedRisingTime, and mStart.

Referenced by getCurrentPhase(), and update8().

+ Here is the caller graph for this function: