CW Decoder (Morse code decoder) 1st release version. Only run on Nucleo-F446RE mbed board.

Dependencies:   Array_Matrix F446_AD_DA ST7565_SPI_LCD TextLCD UIT_FFT_Real

Fork of F446_MySoundMachine by 不韋 呂

Base on F446_MySoundMachine program created by 不韋 呂-san.
Thanks to 不韋 呂-san making fundamental part such as FFT and ADC high speed interrupt driven program.
I just combined LCD and show CW code.

MySpectrogram/AnalysisBase.cpp

Committer:
kenjiArai
Date:
2017-02-05
Revision:
6:5e21ac9f0550

File content as of revision 6:5e21ac9f0550:

//-------------------------------------------------------
//  Base abstract class for spectrum analysis
//
//  2016/07/23, Copyright (c) 2016 MIKAMI, Naoki
//-------------------------------------------------------

#include "AnalysisBase.hpp"

namespace Mikami
{
    AnalyzerBase::AnalyzerBase(int nData, int nFft, int nUse)
        : N_DATA_(nData), N_FFT_(nFft),
          fft_(nFft), wHm_(nData-1, nUse),
          xData_(nUse), wData_(nUse) {}

    void AnalyzerBase::Execute(const float xn[], float db[])
    {
        // Differencing
        for (int n=0; n<N_DATA_-1; n++)
            xData_[n] = xn[n+1] - 0.8f*xn[n];
            
        // Windowing
        wHm_.Execute(xData_, wData_);
            
        Analyze(wData_, db);
    }
}