MCPcopy Create free account
hub / github.com/FastLED/FastLED / countMisplacedPeaks

Function countMisplacedPeaks

tests/misc/fft_sweep.hpp:130–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130int countMisplacedPeaks(fl::span<const SweepFrame> frames) {
131 int count = 0;
132 for (fl::size i = 0; i < frames.size(); ++i) {
133 int diff = frames[i].peakBin - frames[i].expectedBin;
134 if (diff < 0) diff = -diff;
135 if (diff > 1) {
136 count++;
137 }
138 }
139 return count;
140}
141
142float averageConcentration(fl::span<const SweepFrame> frames) {
143 float sum = 0.0f;

Callers 1

fft_sweep.hppFile · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected