mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
AM and NFM demods: improve signal meter with 50ms refresh rate
This commit is contained in:
parent
bc75ca7735
commit
79b4e6c945
@ -218,8 +218,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget
|
|||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false)
|
||||||
m_powerMeterTickCount(0)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
@ -304,12 +303,6 @@ void AMDemodGUI::enterEvent(QEvent*)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AMDemodGUI::tick()
|
void AMDemodGUI::tick()
|
||||||
{
|
|
||||||
if (m_powerMeterTickCount < 4) // 200 ms
|
|
||||||
{
|
|
||||||
m_powerMeterTickCount++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Real magsqAvg, magsqPeak;
|
Real magsqAvg, magsqPeak;
|
||||||
int nbMagsqSamples;
|
int nbMagsqSamples;
|
||||||
@ -324,9 +317,6 @@ void AMDemodGUI::tick()
|
|||||||
|
|
||||||
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
||||||
|
|
||||||
m_powerMeterTickCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool squelchOpen = m_amDemod->getSquelchOpen();
|
bool squelchOpen = m_amDemod->getSquelchOpen();
|
||||||
|
|
||||||
if (squelchOpen != m_squelchOpen)
|
if (squelchOpen != m_squelchOpen)
|
||||||
|
@ -61,7 +61,6 @@ private:
|
|||||||
DownChannelizer* m_channelizer;
|
DownChannelizer* m_channelizer;
|
||||||
AMDemod* m_amDemod;
|
AMDemod* m_amDemod;
|
||||||
bool m_squelchOpen;
|
bool m_squelchOpen;
|
||||||
int m_powerMeterTickCount;
|
|
||||||
|
|
||||||
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||||
virtual ~AMDemodGUI();
|
virtual ~AMDemodGUI();
|
||||||
|
@ -383,12 +383,6 @@ void NFMDemodGUI::blockApplySettings(bool block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NFMDemodGUI::tick()
|
void NFMDemodGUI::tick()
|
||||||
{
|
|
||||||
if (m_powerMeterTickCount < 4) // 200 ms
|
|
||||||
{
|
|
||||||
m_powerMeterTickCount++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Real magsqAvg, magsqPeak;
|
Real magsqAvg, magsqPeak;
|
||||||
int nbMagsqSamples;
|
int nbMagsqSamples;
|
||||||
@ -403,9 +397,6 @@ void NFMDemodGUI::tick()
|
|||||||
|
|
||||||
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
||||||
|
|
||||||
m_powerMeterTickCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool squelchOpen = m_nfmDemod->getSquelchOpen();
|
bool squelchOpen = m_nfmDemod->getSquelchOpen();
|
||||||
|
|
||||||
if (squelchOpen != m_squelchOpen)
|
if (squelchOpen != m_squelchOpen)
|
||||||
|
@ -69,7 +69,6 @@ private:
|
|||||||
bool m_ctcssOn;
|
bool m_ctcssOn;
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
bool m_squelchOpen;
|
bool m_squelchOpen;
|
||||||
int m_powerMeterTickCount;
|
|
||||||
|
|
||||||
static const int m_rfBW[];
|
static const int m_rfBW[];
|
||||||
static const int m_fmDev[];
|
static const int m_fmDev[];
|
||||||
|
Loading…
Reference in New Issue
Block a user