1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-02-03 09:44:01 -05:00

AM demod plugin: slow down channel power refresh rate

This commit is contained in:
f4exb 2017-08-17 17:21:38 +02:00
parent 3536cfb816
commit 2d956df50f
2 changed files with 8 additions and 2 deletions

View File

@ -213,7 +213,8 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget
m_channelMarker(this),
m_basicSettingsShown(false),
m_doApplySettings(true),
m_squelchOpen(false)
m_squelchOpen(false),
m_tickCount(0)
{
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true);
@ -312,7 +313,9 @@ void AMDemodGUI::tick()
(100.0f + powDbPeak) / 100.0f,
nbMagsqSamples);
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
if (m_tickCount % 4 == 0) {
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
}
bool squelchOpen = m_amDemod->getSquelchOpen();
@ -326,5 +329,7 @@ void AMDemodGUI::tick()
ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
}
}
m_tickCount++;
}

View File

@ -61,6 +61,7 @@ private:
DownChannelizer* m_channelizer;
AMDemod* m_amDemod;
bool m_squelchOpen;
uint32_t m_tickCount;
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
virtual ~AMDemodGUI();