1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-03-31 20:25:38 -04:00

Meshtastic demod: removed unused FFT window

This commit is contained in:
f4exb 2026-03-20 06:12:14 +01:00
parent 065d04d7cc
commit 4f0dac4647
2 changed files with 4 additions and 8 deletions

View File

@ -97,7 +97,7 @@ MeshtasticDemodSink::MeshtasticDemodSink() :
m_chirp = 0;
m_chirp0 = 0;
initSF(m_settings.m_spreadFactor, m_settings.m_deBits, m_settings.m_fftWindow);
initSF(m_settings.m_spreadFactor, m_settings.m_deBits);
}
MeshtasticDemodSink::~MeshtasticDemodSink()
@ -115,7 +115,7 @@ MeshtasticDemodSink::~MeshtasticDemodSink()
delete[] m_spectrumLine;
}
void MeshtasticDemodSink::initSF(unsigned int sf, unsigned int deBits, FFTWindow::Function fftWindow)
void MeshtasticDemodSink::initSF(unsigned int sf, unsigned int deBits)
{
if (m_downChirps) {
delete[] m_downChirps;
@ -140,8 +140,6 @@ void MeshtasticDemodSink::initSF(unsigned int sf, unsigned int deBits, FFTWindow
m_nbSymbolsEff = 1 << (sf - deBits);
m_deLength = 1 << deBits;
m_fftLength = m_nbSymbols;
m_fftWindow.create(fftWindow, m_fftLength);
m_fftWindow.setKaiserAlpha(M_PI);
m_interpolatedFFTLength = m_fftInterpolation*m_fftLength;
m_preambleTolerance = std::max(1, (m_deLength*static_cast<int>(m_fftInterpolation))/2);
m_fftSequence = fftFactory->getEngine(m_interpolatedFFTLength, false, &m_fft);
@ -1260,12 +1258,11 @@ void MeshtasticDemodSink::applySettings(const MeshtasticDemodSettings& settings,
if ((settings.m_spreadFactor != m_settings.m_spreadFactor)
|| (settings.m_deBits != m_settings.m_deBits)
|| (settings.m_fftWindow != m_settings.m_fftWindow)
|| fftInterpChanged
|| force)
{
m_fftInterpolation = desiredFFTInterpolation;
initSF(settings.m_spreadFactor, settings.m_deBits, settings.m_fftWindow);
initSF(settings.m_spreadFactor, settings.m_deBits);
}
const unsigned int configuredPreamble = settings.m_preambleChirps > 0U

View File

@ -102,7 +102,6 @@ private:
FFTEngine *m_fft;
int m_fftSequence;
FFTWindow m_fftWindow;
Complex *m_downChirps;
Complex *m_upChirps;
Complex *m_spectrumLine;
@ -184,7 +183,7 @@ private:
int m_deLength; //!< Number of FFT bins collated to represent one symbol
int m_preambleTolerance; //!< Number of FFT bins to collate when looking for preamble
void initSF(unsigned int sf, unsigned int deBits, FFTWindow::Function fftWindow); //!< Init tables, FFTs, depending on spread factor
void initSF(unsigned int sf, unsigned int deBits); //!< Init tables, FFTs, depending on spread factor
void reset();
unsigned int argmax(
const Complex *fftBins,