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

◆ isActive()

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

Implements fl::TimeAlpha.

Definition at line 61 of file time_alpha.cpp.

61 {
62
63 bool not_started = (mFinishedRisingTime == 0) && (mFinishedPlateauTime == 0) &&
65 if (not_started) {
66 // if we have not started, we are not active
67 return false;
68 }
69
70 if (now < mStart) {
71 // if the time is before the start, we are not active
72 return false;
73 }
74
75 if (now > mFinishedFallingTime) {
76 // if the time is after the finished rising, we are not active
77 return false;
78 }
79
80 return true;
81}
uint32_t mFinishedFallingTime
Definition time_alpha.h:69
uint32_t mFinishedPlateauTime
Definition time_alpha.h:68
uint32_t mStart
Definition time_alpha.h:71
uint32_t mFinishedRisingTime
Definition time_alpha.h:67

References mFinishedFallingTime, mFinishedPlateauTime, mFinishedRisingTime, and mStart.

Referenced by applyFancyEffect(), and update().

+ Here is the caller graph for this function: