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

◆ transition()

uint8_t fl::Pir::transition ( uint32_t now)

Returns a 0–255 ramp value: • ramps 0→255 over risingTime • holds 255 until latchMs–fallingTime • ramps 255→0 over fallingTime Outside latch period returns 0.

Definition at line 57 of file pir.cpp.

57 {
58 // ensure detect() logic runs so we trigger on edges
59 detect(now);
60 return mRamp.update8(now);
61}
TimeRamp mRamp
Definition pir.h:69
bool detect(uint32_t now)
Returns true if the PIR is “latched on” (within latchMs of last trigger).
Definition pir.cpp:48

References detect(), and mRamp.

+ Here is the call graph for this function: