mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-05 08:21:16 -05:00
Tried to fix NFM squelch again
This commit is contained in:
parent
f97671ae93
commit
c4ad938083
@ -22,6 +22,7 @@ public:
|
|||||||
Real getValue();
|
Real getValue();
|
||||||
Real getDelayedValue();
|
Real getDelayedValue();
|
||||||
virtual void feed(Complex& ci) = 0;
|
virtual void feed(Complex& ci) = 0;
|
||||||
|
virtual Real returnedDelayedValue() const = 0;
|
||||||
void openedSquelch();
|
void openedSquelch();
|
||||||
void closedSquelch();
|
void closedSquelch();
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ public:
|
|||||||
MagSquaredAGC(int historySize, Real R);
|
MagSquaredAGC(int historySize, Real R);
|
||||||
virtual ~MagSquaredAGC();
|
virtual ~MagSquaredAGC();
|
||||||
virtual void feed(Complex& ci);
|
virtual void feed(Complex& ci);
|
||||||
|
virtual Real returnedDelayedValue() const { return m_u0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MagAGC : public AGC
|
class MagAGC : public AGC
|
||||||
@ -50,6 +52,7 @@ public:
|
|||||||
MagAGC(int historySize, Real R);
|
MagAGC(int historySize, Real R);
|
||||||
virtual ~MagAGC();
|
virtual ~MagAGC();
|
||||||
virtual void feed(Complex& ci);
|
virtual void feed(Complex& ci);
|
||||||
|
virtual Real returnedDelayedValue() const { return m_u0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AlphaAGC : public AGC
|
class AlphaAGC : public AGC
|
||||||
@ -61,6 +64,7 @@ public:
|
|||||||
virtual ~AlphaAGC();
|
virtual ~AlphaAGC();
|
||||||
void resize(int historySize, Real R, Real alpha);
|
void resize(int historySize, Real R, Real alpha);
|
||||||
virtual void feed(Complex& ci);
|
virtual void feed(Complex& ci);
|
||||||
|
virtual Real returnedDelayedValue() const { return 1; }
|
||||||
void openedSquelch();
|
void openedSquelch();
|
||||||
void closedSquelch();
|
void closedSquelch();
|
||||||
private:
|
private:
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "dsp/pidcontroller.h"
|
#include "dsp/pidcontroller.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
|
|
||||||
static const Real afSqTones[2] = {1200.0, 8000.0}; // {1200.0, 8000.0};
|
static const Real afSqTones[2] = {1200.0, 6000.0}; // {1200.0, 8000.0};
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureNFMDemod, Message)
|
MESSAGE_CLASS_DEFINITION(NFMDemod::MsgConfigureNFMDemod, Message)
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ void NFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
{
|
{
|
||||||
demod = m_bandpass.filter(demod);
|
demod = m_bandpass.filter(demod);
|
||||||
demod *= m_running.m_volume;
|
demod *= m_running.m_volume;
|
||||||
sample = demod * ((1<<19)/301) * m_AGC.getDelayedValue(); // denominator = bandpass filter number of taps
|
sample = demod * ((1<<18)/301) * m_AGC.getDelayedValue(); // denominator = bandpass filter number of taps
|
||||||
}
|
}
|
||||||
|
|
||||||
m_AGC.openedSquelch();
|
m_AGC.openedSquelch();
|
||||||
|
@ -48,7 +48,7 @@ Real AGC::getDelayedValue()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 1;
|
return returnedDelayedValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user