FastLED 3.10.6
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 65 of file pir.cpp.hpp.

65 {
66 // ensure detect() logic runs so we trigger on edges
67 detect(now);
68 return mRamp.update8(now);
69}
bool detect(u32 now)
Returns true if the PIR is “latched on” (within latchMs of last trigger).
Definition pir.cpp.hpp:55
TimeRamp mRamp
Definition pir.h:65

References detect(), and mRamp.

+ Here is the call graph for this function: