1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

Frequency Tracker: refactoring of classes: more fixes

This commit is contained in:
f4exb 2019-12-09 12:55:13 +01:00
parent 4399f6b537
commit 38e1635149
2 changed files with 2 additions and 18 deletions

View File

@ -54,21 +54,7 @@ const int FreqTracker::m_udpBlockSize = 512;
FreqTracker::FreqTracker(DeviceAPI *deviceAPI) :
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
m_deviceAPI(deviceAPI),
m_deviceSampleRate(48000),
m_inputSampleRate(48000),
m_inputFrequencyOffset(0),
m_channelSampleRate(48000),
m_running(false),
m_squelchOpen(false),
m_squelchGate(0),
m_magsqSum(0.0f),
m_magsqPeak(0.0f),
m_magsqCount(0),
m_timerConnected(false),
m_tickCount(0),
m_lastCorrAbs(0),
m_avgDeltaFreq(0.0),
m_settingsMutex(QMutex::Recursive)
m_basebandSampleRate(0)
{
setObjectName(m_channelId);

View File

@ -114,9 +114,7 @@ bool FreqTrackerGUI::handleMessage(const Message& message)
m_channelSampleRate = cfg.getSampleRate();
ui->channelSampleRateText->setText(tr("%1k").arg(QString::number(m_channelSampleRate / 1000.0f, 'g', 5)));
blockApplySettings(true);
m_settings.m_inputFrequencyOffset = cfg.getFrequencyOffset();
ui->deltaFrequency->setValue(m_settings.m_inputFrequencyOffset);
m_channelMarker.setCenterFrequency(cfg.getFrequencyOffset());
blockApplySettings(false);
if (m_channelSampleRate > 1000) {
@ -320,7 +318,7 @@ FreqTrackerGUI::FreqTrackerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
m_channelMarker.setColor(Qt::yellow);
m_channelMarker.setBandwidth(5000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("AM Demodulator");
m_channelMarker.setTitle("Frequency Tracker");
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only