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

◆ transition()

uint8_t fl::PirAdvanced::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 50 of file pir.cpp.

50 {
51 // ensure detect() logic runs so we trigger on edges
52 detect(now);
53 return mRamp.update(now);
54}
TimeRamp mRamp
Definition pir.h:68
bool detect(uint32_t now)
Returns true if the PIR is “latched on” (within latchMs of last trigger).
Definition pir.cpp:41

References detect(), and mRamp.

+ Here is the call graph for this function: