adafruit / Adafruit_ZeroFFT

simple FFT for cortex m0
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

Add feature to disable/enable hanning window #5

Open adfelippe opened 4 years ago

adfelippe commented 4 years ago

The hanning window function is useful when there is a chance of leakage in the FFT results for some scenarios with periodic signals. However, windows aren't always the best approach and not using them can result in a better distribution of the FFT results. Therefore the functions enableFFTWindow() and disableFFTWindow were added. By default, hanning window is enabled so the library keeps full compatibility and can be updated without any change. Additional includes were added to the Adafruit_ZeroFFT.h header file so it can be used with little modification with a project outside Arduino evironment just by commenting out #include .