1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

Fix SDFT batch process (#12218)

Fix SDFT batch processing
This commit is contained in:
Jan Post 2023-01-19 05:58:01 +01:00 committed by GitHub
parent e782ab9b28
commit fb29036ba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ FAST_CODE void sdftPush(sdft_t *sdft, const float sample)
// Add new sample to frequency spectrum in parts
FAST_CODE void sdftPushBatch(sdft_t *sdft, const float sample, const int batchIdx)
{
const int batchStart = sdft->batchSize * batchIdx;
const int batchStart = sdft->batchSize * batchIdx + sdft->startBin;
int batchEnd = batchStart;
const float delta = sample - rPowerN * sdft->samples[sdft->idx];