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

◆ computeVerticalLevels()

void computeVerticalLevels ( )
Examples
PJRCSpectrumAnalyzer.ino.

Definition at line 128 of file PJRCSpectrumAnalyzer.ino.

128 {
129 unsigned int y;
130 float n, logLevel, linearLevel;
131
132 for (y=0; y < matrix_height; y++) {
133 n = (float)y / (float)(matrix_height - 1);
134 logLevel = pow10f(n * -1.0 * (dynamicRange / 20.0));
135 linearLevel = 1.0 - n;
136 linearLevel = linearLevel * linearBlend;
137 logLevel = logLevel * (1.0 - linearBlend);
138 thresholdVertical[y] = (logLevel + linearLevel) * maxLevel;
139 }
140}
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
float thresholdVertical[matrix_height]
const unsigned int matrix_height
const float linearBlend
const float dynamicRange
const float maxLevel

References dynamicRange, linearBlend, matrix_height, maxLevel, thresholdVertical, and y.

Referenced by setup().

+ Here is the caller graph for this function: