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

◆ detect()

bool fl::PirAdvanced::detect ( uint32_t now)

Returns true if the PIR is “latched on” (within latchMs of last trigger).

Definition at line 41 of file pir.cpp.

41 {
42 bool currentState = mPir.detect();
43 if (currentState && !mLastState) {
44 mRamp.trigger(now);
45 }
46 mLastState = currentState;
47 return mRamp.isActive(now);
48}
bool mLastState
Definition pir.h:69
TimeRamp mRamp
Definition pir.h:68

References mLastState, mPir, and mRamp.

Referenced by transition().

+ Here is the caller graph for this function: