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

54 {
55 // ensure detect() logic runs so we trigger on edges
56 detect(now);
57 return mRamp.update8(now);
58}
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:45

References detect(), and mRamp.

+ Here is the call graph for this function: