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

◆ getCurrentPhase()

RampPhase fl::TimeRamp::getCurrentPhase ( u32 now) const

Get the current phase of the ramp.

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

67 {
68 if (!isActive(now)) {
70 }
71
72 if (now < mFinishedRisingTime) {
73 return RampPhase::Rising;
74 } else if (now < mFinishedPlateauTime) {
75 return RampPhase::Plateau;
76 } else if (now < mFinishedFallingTime) {
77 return RampPhase::Falling;
78 }
79
81}
u32 mFinishedPlateauTime
Definition time_alpha.h:94
u32 mFinishedRisingTime
Definition time_alpha.h:93
bool isActive(u32 now) const FL_NOEXCEPT override
u32 mFinishedFallingTime
Definition time_alpha.h:95

References fl::Falling, FL_NOEXCEPT, fl::Inactive, isActive(), mFinishedFallingTime, mFinishedPlateauTime, mFinishedRisingTime, fl::Plateau, and fl::Rising.

Referenced by trigger().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: