Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: PingDetect/FFT.cpp
- Revision:
- 1:227db871d328
- Parent:
- 0:efb27fbc92c0
--- a/PingDetect/FFT.cpp Mon Jul 30 09:57:42 2012 +0000
+++ b/PingDetect/FFT.cpp Tue Aug 21 14:23:03 2012 +0000
@@ -1,3 +1,7 @@
+/*
+ Program to caluclate the FFT strength of a frequency
+*/
+
#include "FFT.h"
// Using the Mellen FFT
@@ -7,10 +11,8 @@
CalculateFFT(data);
- // adding the center frequencies with the 4 closesed frequencies
-// amp = my[centerFreq-2]+my[centerFreq]+my[centerFreq+2];
+ // adding the center frequencies with the 2 closesed frequencies
amp = my[centerFreq-2]+my[centerFreq]+my[centerFreq+2];
-// return amp;
if (amp >= AMPLITUDE_LIMIT)
return found; // indicating pinger signal found