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

◆ transition()

u8 fl::Pir::transition ( u32 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 58 of file pir.cpp.hpp.

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

References detect(), and mRamp.

+ Here is the call graph for this function: