29 u32 elapsed = now - start;
30 u32 total =
end - start;
31 float out =
static_cast<float>(elapsed) /
static_cast<float>(total);
41 return static_cast<u16
>(
update8(now) << 8) + 0xFF;
44 return static_cast<float>(
update16(now)) / 65535.0f;
125 bool not_started = (
mEnd == 0) && (
mStart == 0);
142 bool not_started = (
mEnd == 0) && (
mStart == 0);
152 bool not_started = (
mEnd == 0) && (
mStart == 0);
virtual void trigger(u32 now) FL_NO_EXCEPT=0
virtual bool isActive(u32 now) const FL_NO_EXCEPT=0
virtual float updatef(u32 now) FL_NO_EXCEPT
virtual ~TimeAlpha() FL_NO_EXCEPT=default
virtual u16 update16(u32 now) FL_NO_EXCEPT
virtual u8 update8(u32 now) FL_NO_EXCEPT=0
bool isActive(u32 now) const FL_NO_EXCEPT override
void set_max_clamp(float max) FL_NO_EXCEPT
void trigger(u32 now) FL_NO_EXCEPT override
TimeClampedTransition(u32 duration) FL_NO_EXCEPT
u8 update8(u32 now) FL_NO_EXCEPT override
float updatef(u32 now) FL_NO_EXCEPT override
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.
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
u8 time_alpha8(u32 now, u32 start, u32 end) FL_NO_EXCEPT
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
u16 time_alpha16(u32 now, u32 start, u32 end) FL_NO_EXCEPT
float time_alphaf(u32 now, u32 start, u32 end) FL_NO_EXCEPT
Base definition for an LED controller.