16 u32 elapsed = now - start;
17 u32 total =
end - start;
18 u32 out = (elapsed * 255) / total;
22 return static_cast<u8>(out);
32 u32 elapsed = now - start;
33 u32 total =
end - start;
34 u32 out = (elapsed * 65535) / total;
38 return static_cast<u16
>(out);
u8 update8(u32 now) FL_NO_EXCEPT override
Compute current 0–255 output based on how much time has elapsed since trigger().
bool isActive(u32 now) const FL_NO_EXCEPT override
TimeRamp(u32 risingTime, u32 latchMs, u32 fallingTime) FL_NO_EXCEPT
void trigger(u32 now) FL_NO_EXCEPT override
Call this when you want to (re)start the ramp cycle.
RampPhase getCurrentPhase(u32 now) const FL_NO_EXCEPT
Get the current phase of the ramp.
Centralized logging categories for FastLED hardware interfaces and subsystems.
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
u8 time_alpha8(u32 now, u32 start, u32 end) FL_NO_EXCEPT
u16 time_alpha16(u32 now, u32 start, u32 end) FL_NO_EXCEPT
Base definition for an LED controller.