mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
Fixed power display going to floor value in some demods
This commit is contained in:
parent
e783bcbbcb
commit
f368c62329
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -1,9 +1,10 @@
|
|||||||
sdrangel (4.0.6-1) unstable; urgency=medium
|
sdrangel (4.0.6-1) unstable; urgency=medium
|
||||||
|
|
||||||
* Web API: RTL-SDR: fixed RF bandwidth setting
|
* Web API: RTL-SDR: fixed RF bandwidth setting
|
||||||
* Web API: enhnaced DV serial and AM demod interfaces
|
* Web API: enhanced DV serial and AM demod interfaces
|
||||||
|
* Fixed power display going to floor value in some demods
|
||||||
|
|
||||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 05 Aug 2018 09:14:18 +0200
|
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 05 Aug 2018 19:14:18 +0200
|
||||||
|
|
||||||
sdrangel (4.0.5-1) unstable; urgency=medium
|
sdrangel (4.0.5-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
@ -125,20 +125,38 @@ public:
|
|||||||
bool getPllLocked() const { return m_settings.m_pll && m_pll.locked(); }
|
bool getPllLocked() const { return m_settings.m_pll && m_pll.locked(); }
|
||||||
Real getPllFrequency() const { return m_pll.getFreq(); }
|
Real getPllFrequency() const { return m_pll.getFreq(); }
|
||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
||||||
{
|
{
|
||||||
avg = m_magsqCount == 0 ? 1e-10 : m_magsqSum / m_magsqCount;
|
if (m_magsqCount > 0)
|
||||||
peak = m_magsqPeak == 0.0 ? 1e-10 : m_magsqPeak;
|
{
|
||||||
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
m_magsq = m_magsqSum / m_magsqCount;
|
||||||
m_magsqSum = 0.0f;
|
m_magSqLevelStore.m_magsq = m_magsq;
|
||||||
|
m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg = m_magSqLevelStore.m_magsq;
|
||||||
|
peak = m_magSqLevelStore.m_magsqPeak;
|
||||||
|
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
||||||
|
|
||||||
|
m_magsqSum = 0.0f;
|
||||||
m_magsqPeak = 0.0f;
|
m_magsqPeak = 0.0f;
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QString m_channelIdURI;
|
static const QString m_channelIdURI;
|
||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct MagSqLevelsStore
|
||||||
|
{
|
||||||
|
MagSqLevelsStore() :
|
||||||
|
m_magsq(1e-12),
|
||||||
|
m_magsqPeak(1e-12)
|
||||||
|
{}
|
||||||
|
double m_magsq;
|
||||||
|
double m_magsqPeak;
|
||||||
|
};
|
||||||
|
|
||||||
enum RateState {
|
enum RateState {
|
||||||
RSInitialFill,
|
RSInitialFill,
|
||||||
RSRunning
|
RSRunning
|
||||||
@ -167,6 +185,7 @@ private:
|
|||||||
double m_magsqSum;
|
double m_magsqSum;
|
||||||
double m_magsqPeak;
|
double m_magsqPeak;
|
||||||
int m_magsqCount;
|
int m_magsqCount;
|
||||||
|
MagSqLevelsStore m_magSqLevelStore;
|
||||||
|
|
||||||
MovingAverageUtil<Real, double, 16> m_movingAverage;
|
MovingAverageUtil<Real, double, 16> m_movingAverage;
|
||||||
SimpleAGC<4800> m_volumeAGC;
|
SimpleAGC<4800> m_volumeAGC;
|
||||||
|
@ -146,10 +146,17 @@ public:
|
|||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
||||||
{
|
{
|
||||||
avg = m_magsqCount == 0 ? 1e-10 : m_magsqSum / m_magsqCount;
|
if (m_magsqCount > 0)
|
||||||
m_magsq = avg;
|
{
|
||||||
peak = m_magsqPeak == 0.0 ? 1e-10 : m_magsqPeak;
|
m_magsq = m_magsqSum / m_magsqCount;
|
||||||
|
m_magSqLevelStore.m_magsq = m_magsq;
|
||||||
|
m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg = m_magSqLevelStore.m_magsq;
|
||||||
|
peak = m_magSqLevelStore.m_magsqPeak;
|
||||||
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
||||||
|
|
||||||
m_magsqSum = 0.0f;
|
m_magsqSum = 0.0f;
|
||||||
m_magsqPeak = 0.0f;
|
m_magsqPeak = 0.0f;
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
@ -184,6 +191,16 @@ public:
|
|||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct MagSqLevelsStore
|
||||||
|
{
|
||||||
|
MagSqLevelsStore() :
|
||||||
|
m_magsq(1e-12),
|
||||||
|
m_magsqPeak(1e-12)
|
||||||
|
{}
|
||||||
|
double m_magsq;
|
||||||
|
double m_magsqPeak;
|
||||||
|
};
|
||||||
|
|
||||||
enum RateState {
|
enum RateState {
|
||||||
RSInitialFill,
|
RSInitialFill,
|
||||||
RSRunning
|
RSRunning
|
||||||
@ -224,6 +241,7 @@ private:
|
|||||||
double m_magsqSum;
|
double m_magsqSum;
|
||||||
double m_magsqPeak;
|
double m_magsqPeak;
|
||||||
int m_magsqCount;
|
int m_magsqCount;
|
||||||
|
MagSqLevelsStore m_magSqLevelStore;
|
||||||
|
|
||||||
AudioVector m_audioBuffer;
|
AudioVector m_audioBuffer;
|
||||||
uint m_audioBufferFill;
|
uint m_audioBufferFill;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
|
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
|
||||||
QString("Broadcast FM Demodulator"),
|
QString("Broadcast FM Demodulator"),
|
||||||
QString("4.0.2"),
|
QString("4.0.6"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
@ -117,10 +117,17 @@ public:
|
|||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
||||||
{
|
{
|
||||||
avg = m_magsqCount == 0 ? 1e-10 : m_magsqSum / m_magsqCount;
|
if (m_magsqCount > 0)
|
||||||
m_magsq = avg;
|
{
|
||||||
peak = m_magsqPeak == 0.0 ? 1e-10 : m_magsqPeak;
|
m_magsq = m_magsqSum / m_magsqCount;
|
||||||
|
m_magSqLevelStore.m_magsq = m_magsq;
|
||||||
|
m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg = m_magSqLevelStore.m_magsq;
|
||||||
|
peak = m_magSqLevelStore.m_magsqPeak;
|
||||||
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
||||||
|
|
||||||
m_magsqSum = 0.0f;
|
m_magsqSum = 0.0f;
|
||||||
m_magsqPeak = 0.0f;
|
m_magsqPeak = 0.0f;
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
@ -146,6 +153,16 @@ public:
|
|||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct MagSqLevelsStore
|
||||||
|
{
|
||||||
|
MagSqLevelsStore() :
|
||||||
|
m_magsq(1e-12),
|
||||||
|
m_magsqPeak(1e-12)
|
||||||
|
{}
|
||||||
|
double m_magsq;
|
||||||
|
double m_magsqPeak;
|
||||||
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
signalFormatNone,
|
signalFormatNone,
|
||||||
@ -208,6 +225,7 @@ private:
|
|||||||
double m_magsqSum;
|
double m_magsqSum;
|
||||||
double m_magsqPeak;
|
double m_magsqPeak;
|
||||||
int m_magsqCount;
|
int m_magsqCount;
|
||||||
|
MagSqLevelsStore m_magSqLevelStore;
|
||||||
|
|
||||||
SampleVector m_scopeSampleBuffer;
|
SampleVector m_scopeSampleBuffer;
|
||||||
AudioVector m_audioBuffer;
|
AudioVector m_audioBuffer;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
|
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
|
||||||
QString("DSD Demodulator"),
|
QString("DSD Demodulator"),
|
||||||
QString("4.0.1"),
|
QString("4.0.6"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
@ -154,10 +154,17 @@ public:
|
|||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
||||||
{
|
{
|
||||||
avg = m_magsqCount == 0 ? 1e-10 : m_magsqSum / m_magsqCount;
|
if (m_magsqCount > 0)
|
||||||
m_magsq = avg;
|
{
|
||||||
peak = m_magsqPeak == 0.0 ? 1e-10 : m_magsqPeak;
|
m_magsq = m_magsqSum / m_magsqCount;
|
||||||
|
m_magSqLevelStore.m_magsq = m_magsq;
|
||||||
|
m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg = m_magSqLevelStore.m_magsq;
|
||||||
|
peak = m_magSqLevelStore.m_magsqPeak;
|
||||||
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
||||||
|
|
||||||
m_magsqSum = 0.0f;
|
m_magsqSum = 0.0f;
|
||||||
m_magsqPeak = 0.0f;
|
m_magsqPeak = 0.0f;
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
@ -167,6 +174,16 @@ public:
|
|||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct MagSqLevelsStore
|
||||||
|
{
|
||||||
|
MagSqLevelsStore() :
|
||||||
|
m_magsq(1e-12),
|
||||||
|
m_magsqPeak(1e-12)
|
||||||
|
{}
|
||||||
|
double m_magsq;
|
||||||
|
double m_magsqPeak;
|
||||||
|
};
|
||||||
|
|
||||||
enum RateState {
|
enum RateState {
|
||||||
RSInitialFill,
|
RSInitialFill,
|
||||||
RSRunning
|
RSRunning
|
||||||
@ -203,6 +220,7 @@ private:
|
|||||||
double m_magsqSum;
|
double m_magsqSum;
|
||||||
double m_magsqPeak;
|
double m_magsqPeak;
|
||||||
int m_magsqCount;
|
int m_magsqCount;
|
||||||
|
MagSqLevelsStore m_magSqLevelStore;
|
||||||
|
|
||||||
MovingAverageUtil<Real, double, 32> m_movingAverage;
|
MovingAverageUtil<Real, double, 32> m_movingAverage;
|
||||||
AFSquelch m_afSquelch;
|
AFSquelch m_afSquelch;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
|
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
|
||||||
QString("NFM Demodulator"),
|
QString("NFM Demodulator"),
|
||||||
QString("3.14.6"),
|
QString("4.0.6"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
@ -126,10 +126,17 @@ public:
|
|||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
||||||
{
|
{
|
||||||
avg = m_magsqCount == 0 ? 1e-10 : m_magsqSum / m_magsqCount;
|
if (m_magsqCount > 0)
|
||||||
m_magsq = avg;
|
{
|
||||||
peak = m_magsqPeak == 0.0 ? 1e-10 : m_magsqPeak;
|
m_magsq = m_magsqSum / m_magsqCount;
|
||||||
|
m_magSqLevelStore.m_magsq = m_magsq;
|
||||||
|
m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg = m_magSqLevelStore.m_magsq;
|
||||||
|
peak = m_magSqLevelStore.m_magsqPeak;
|
||||||
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
||||||
|
|
||||||
m_magsqSum = 0.0f;
|
m_magsqSum = 0.0f;
|
||||||
m_magsqPeak = 0.0f;
|
m_magsqPeak = 0.0f;
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
@ -153,6 +160,16 @@ public:
|
|||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct MagSqLevelsStore
|
||||||
|
{
|
||||||
|
MagSqLevelsStore() :
|
||||||
|
m_magsq(1e-12),
|
||||||
|
m_magsqPeak(1e-12)
|
||||||
|
{}
|
||||||
|
double m_magsq;
|
||||||
|
double m_magsqPeak;
|
||||||
|
};
|
||||||
|
|
||||||
class MsgConfigureSSBDemodPrivate : public Message {
|
class MsgConfigureSSBDemodPrivate : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
@ -268,6 +285,7 @@ private:
|
|||||||
double m_magsqSum;
|
double m_magsqSum;
|
||||||
double m_magsqPeak;
|
double m_magsqPeak;
|
||||||
int m_magsqCount;
|
int m_magsqCount;
|
||||||
|
MagSqLevelsStore m_magSqLevelStore;
|
||||||
MagAGC m_agc;
|
MagAGC m_agc;
|
||||||
bool m_agcActive;
|
bool m_agcActive;
|
||||||
bool m_agcClamping;
|
bool m_agcClamping;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
|
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
|
||||||
QString("SSB Demodulator"),
|
QString("SSB Demodulator"),
|
||||||
QString("4.0.2"),
|
QString("4.0.6"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
@ -109,10 +109,17 @@ public:
|
|||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples)
|
||||||
{
|
{
|
||||||
avg = m_magsqCount == 0 ? 1e-10 : m_magsqSum / m_magsqCount;
|
if (m_magsqCount > 0)
|
||||||
m_magsq = avg;
|
{
|
||||||
peak = m_magsqPeak == 0.0 ? 1e-10 : m_magsqPeak;
|
m_magsq = m_magsqSum / m_magsqCount;
|
||||||
|
m_magSqLevelStore.m_magsq = m_magsq;
|
||||||
|
m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg = m_magSqLevelStore.m_magsq;
|
||||||
|
peak = m_magSqLevelStore.m_magsqPeak;
|
||||||
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
|
||||||
|
|
||||||
m_magsqSum = 0.0f;
|
m_magsqSum = 0.0f;
|
||||||
m_magsqPeak = 0.0f;
|
m_magsqPeak = 0.0f;
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
@ -145,6 +152,16 @@ public:
|
|||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct MagSqLevelsStore
|
||||||
|
{
|
||||||
|
MagSqLevelsStore() :
|
||||||
|
m_magsq(1e-12),
|
||||||
|
m_magsqPeak(1e-12)
|
||||||
|
{}
|
||||||
|
double m_magsq;
|
||||||
|
double m_magsqPeak;
|
||||||
|
};
|
||||||
|
|
||||||
enum RateState {
|
enum RateState {
|
||||||
RSInitialFill,
|
RSInitialFill,
|
||||||
RSRunning
|
RSRunning
|
||||||
@ -172,6 +189,7 @@ private:
|
|||||||
double m_magsqSum;
|
double m_magsqSum;
|
||||||
double m_magsqPeak;
|
double m_magsqPeak;
|
||||||
int m_magsqCount;
|
int m_magsqCount;
|
||||||
|
MagSqLevelsStore m_magSqLevelStore;
|
||||||
|
|
||||||
MovingAverageUtil<Real, double, 16> m_movingAverage;
|
MovingAverageUtil<Real, double, 16> m_movingAverage;
|
||||||
Real m_fmExcursion;
|
Real m_fmExcursion;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor WFMPlugin::m_pluginDescriptor = {
|
const PluginDescriptor WFMPlugin::m_pluginDescriptor = {
|
||||||
QString("WFM Demodulator"),
|
QString("WFM Demodulator"),
|
||||||
QString("4.0.0"),
|
QString("4.0.6"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
Loading…
Reference in New Issue
Block a user