Browse Source

Fix FFT read range (now inclusive)

dds
PaulStoffregen 9 years ago
parent
commit
8075883982
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      analyze_fft1024.h
  2. +1
    -1
      analyze_fft256.h

+ 1
- 1
analyze_fft1024.h View File

uint32_t sum = 0; uint32_t sum = 0;
do { do {
sum += output[binFirst++]; sum += output[binFirst++];
} while (binFirst < binLast);
} while (binFirst <= binLast);
return (float)sum * (1.0 / 16384.0); return (float)sum * (1.0 / 16384.0);
} }
void averageTogether(uint8_t n) { void averageTogether(uint8_t n) {

+ 1
- 1
analyze_fft256.h View File

uint32_t sum = 0; uint32_t sum = 0;
do { do {
sum += output[binFirst++]; sum += output[binFirst++];
} while (binFirst < binLast);
} while (binFirst <= binLast);
return (float)sum * (1.0 / 16384.0); return (float)sum * (1.0 / 16384.0);
} }
void averageTogether(uint8_t n) { void averageTogether(uint8_t n) {

Loading…
Cancel
Save