FastLED 3.10.6
Loading...
Searching...
No Matches

◆ fireAnalyzer()

void fireAnalyzer ( float bass,
float threshold,
float minIntensity,
float & trigger )
Examples
hydropack.ino.

Definition at line 184 of file hydropack.ino.

185 {
186 if (bass <= threshold) {
187 return;
188 }
189 const float intensity = fl::clamp((bass - threshold) / threshold,
190 minIntensity, 1.0f);
191 trigger = fl::max(trigger, intensity);
192}
fl::UIButton trigger("Trigger")
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
Definition math.h:75
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NO_EXCEPT

References fl::clamp(), fl::max(), and trigger().

Referenced by setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: