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

◆ detect()

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

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

Definition at line 48 of file pir.cpp.

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

References mLastState, mPir, and mRamp.

Referenced by transition().

+ Here is the caller graph for this function: