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 45 of file pir.cpp.

45 {
46 bool currentState = mPir.detect();
47 if (currentState && !mLastState) {
48 mRamp.trigger(now);
49 }
50 mLastState = currentState;
51 return mRamp.isActive(now);
52}
bool mLastState
Definition pir.h:70
TimeRamp mRamp
Definition pir.h:69

References mLastState, mPir, and mRamp.

Referenced by transition().

+ Here is the caller graph for this function: