NFM demod plugin: slow down channel power refresh rate

pull/60/head
f4exb 2017-08-17 17:25:10 +02:00
rodzic 2d956df50f
commit ce7271aeeb
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -272,7 +272,8 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
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);
@ -414,7 +415,9 @@ void NFMDemodGUI::tick()
(100.0f + powDbPeak) / 100.0f,
nbMagsqSamples);
ui->channelPower->setText(tr("%1 dB").arg(powDbAvg, 0, 'f', 1));
if (m_tickCount % 4 == 0) {
ui->channelPower->setText(tr("%1 dB").arg(powDbAvg, 0, 'f', 1));
}
bool squelchOpen = m_nfmDemod->getSquelchOpen();
@ -428,4 +431,6 @@ void NFMDemodGUI::tick()
m_squelchOpen = squelchOpen;
}
m_tickCount++;
}

Wyświetl plik

@ -69,6 +69,7 @@ private:
bool m_ctcssOn;
bool m_audioMute;
bool m_squelchOpen;
uint32_t m_tickCount;
static const int m_rfBW[];
static const int m_fmDev[];