From 6384c88f8b701c166f7cfa2db5b7371dbdd7b555 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 14 Jan 2018 20:23:28 +0100 Subject: [PATCH] AirspyHF: removed now useless LO ppm correction and DC and IQ corrections --- plugins/samplesource/airspyhf/airspyhfgui.cpp | 25 ----- plugins/samplesource/airspyhf/airspyhfgui.h | 3 - plugins/samplesource/airspyhf/airspyhfgui.ui | 94 +++---------------- .../samplesource/airspyhf/airspyhfinput.cpp | 10 -- .../airspyhf/airspyhfsettings.cpp | 9 -- .../samplesource/airspyhf/airspyhfsettings.h | 3 - 6 files changed, 12 insertions(+), 132 deletions(-) diff --git a/plugins/samplesource/airspyhf/airspyhfgui.cpp b/plugins/samplesource/airspyhf/airspyhfgui.cpp index 5e92f4057..e5763fb9a 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.cpp +++ b/plugins/samplesource/airspyhf/airspyhfgui.cpp @@ -216,14 +216,8 @@ void AirspyHFGui::displaySettings() updateFrequencyLimits(); ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000); - ui->LOppm->setValue(m_settings.m_LOppmTenths); - ui->LOppmText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1))); - ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex); - ui->dcOffset->setChecked(m_settings.m_dcBlock); - ui->iqImbalance->setChecked(m_settings.m_iqCorrection); - ui->decim->setCurrentIndex(m_settings.m_log2Decim); ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos); blockApplySettings(false); @@ -269,25 +263,6 @@ void AirspyHFGui::on_centerFrequency_changed(quint64 value) sendSettings(); } -void AirspyHFGui::on_LOppm_valueChanged(int value) -{ - m_settings.m_LOppmTenths = value; - ui->LOppmText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1))); - sendSettings(); -} - -void AirspyHFGui::on_dcOffset_toggled(bool checked) -{ - m_settings.m_dcBlock = checked; - sendSettings(); -} - -void AirspyHFGui::on_iqImbalance_toggled(bool checked) -{ - m_settings.m_iqCorrection = checked; - sendSettings(); -} - void AirspyHFGui::on_sampleRate_currentIndexChanged(int index) { m_settings.m_devSampleRateIndex = index; diff --git a/plugins/samplesource/airspyhf/airspyhfgui.h b/plugins/samplesource/airspyhf/airspyhfgui.h index a3842067d..32a477b21 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.h +++ b/plugins/samplesource/airspyhf/airspyhfgui.h @@ -77,9 +77,6 @@ private: private slots: void on_centerFrequency_changed(quint64 value); - void on_LOppm_valueChanged(int value); - void on_dcOffset_toggled(bool checked); - void on_iqImbalance_toggled(bool checked); void on_sampleRate_currentIndexChanged(int index); void on_decim_currentIndexChanged(int index); void on_fcPos_currentIndexChanged(int index); diff --git a/plugins/samplesource/airspyhf/airspyhfgui.ui b/plugins/samplesource/airspyhf/airspyhfgui.ui index 02cd9c162..e5022f2a9 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.ui +++ b/plugins/samplesource/airspyhf/airspyhfgui.ui @@ -6,8 +6,8 @@ 0 0 - 320 - 240 + 324 + 180 @@ -19,7 +19,7 @@ 320 - 220 + 180 @@ -173,78 +173,22 @@ - - - 3 + + + Qt::Horizontal - - - - LO correction ppm - - - LO ppm - - - - - - - Local Oscillator frequency correction (ppm) - - - -100 - - - 100 - - - 1 - - - Qt::Horizontal - - - - - - - 0.0 - - - - + - - - - DC offset auto correction - + + - DC + Band - - - IQ imbalance auto correction - - - IQ - - - - - - - Auto - - - - Qt::Horizontal @@ -257,7 +201,7 @@ - + @@ -273,7 +217,7 @@ - + @@ -296,22 +240,8 @@ - - - - Band - - - - - - - Qt::Horizontal - - - diff --git a/plugins/samplesource/airspyhf/airspyhfinput.cpp b/plugins/samplesource/airspyhf/airspyhfinput.cpp index 05d203225..184289286 100644 --- a/plugins/samplesource/airspyhf/airspyhfinput.cpp +++ b/plugins/samplesource/airspyhf/airspyhfinput.cpp @@ -331,9 +331,6 @@ void AirspyHFInput::setDeviceCenterFrequency(quint64 freq_hz, const AirspyHFSett break; } - qint64 df = ((qint64)freq_hz * settings.m_LOppmTenths) / 10000000LL; - freq_hz += df; - airspyhf_error rc = (airspyhf_error) airspyhf_set_freq(m_dev, static_cast(freq_hz)); if (rc == AIRSPYHF_SUCCESS) { @@ -353,12 +350,6 @@ bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force) qDebug() << "AirspyHFInput::applySettings"; - if ((m_settings.m_dcBlock != settings.m_dcBlock) || - (m_settings.m_iqCorrection != settings.m_iqCorrection) || force) - { - m_deviceAPI->configureCorrections(settings.m_dcBlock, settings.m_iqCorrection); - } - if ((m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex) || force) { forwardChange = true; @@ -395,7 +386,6 @@ bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force) } if (force || (m_settings.m_centerFrequency != settings.m_centerFrequency) - || (m_settings.m_LOppmTenths != settings.m_LOppmTenths) || (m_settings.m_fcPos != settings.m_fcPos) || (m_settings.m_transverterMode != settings.m_transverterMode) || (m_settings.m_transverterDeltaFrequency != settings.m_transverterDeltaFrequency)) diff --git a/plugins/samplesource/airspyhf/airspyhfsettings.cpp b/plugins/samplesource/airspyhf/airspyhfsettings.cpp index 2c68f7089..e07225ebe 100644 --- a/plugins/samplesource/airspyhf/airspyhfsettings.cpp +++ b/plugins/samplesource/airspyhf/airspyhfsettings.cpp @@ -27,11 +27,8 @@ void AirspyHFSettings::resetToDefaults() { m_centerFrequency = 7150*1000; m_devSampleRateIndex = 0; - m_LOppmTenths = 0; m_log2Decim = 0; m_fcPos = FC_POS_CENTER; - m_dcBlock = false; - m_iqCorrection = false; m_transverterMode = false; m_transverterDeltaFrequency = 0; m_bandIndex = 0; @@ -42,11 +39,8 @@ QByteArray AirspyHFSettings::serialize() const SimpleSerializer s(1); s.writeU32(1, m_devSampleRateIndex); - s.writeS32(2, m_LOppmTenths); s.writeU32(3, m_log2Decim); s.writeS32(4, m_fcPos); - s.writeBool(5, m_dcBlock); - s.writeBool(6, m_iqCorrection); s.writeBool(7, m_transverterMode); s.writeS64(8, m_transverterDeltaFrequency); s.writeU32(9, m_bandIndex); @@ -70,12 +64,9 @@ bool AirspyHFSettings::deserialize(const QByteArray& data) quint32 uintval; d.readU32(1, &m_devSampleRateIndex, 0); - d.readS32(2, &m_LOppmTenths, 0); d.readU32(3, &m_log2Decim, 0); d.readS32(4, &intval, 0); m_fcPos = (fcPos_t) intval; - d.readBool(5, &m_dcBlock, false); - d.readBool(6, &m_iqCorrection, false); d.readBool(7, &m_transverterMode, false); d.readS64(8, &m_transverterDeltaFrequency, 0); d.readU32(9, &uintval, 0); diff --git a/plugins/samplesource/airspyhf/airspyhfsettings.h b/plugins/samplesource/airspyhf/airspyhfsettings.h index 49d284896..501a8140a 100644 --- a/plugins/samplesource/airspyhf/airspyhfsettings.h +++ b/plugins/samplesource/airspyhf/airspyhfsettings.h @@ -26,11 +26,8 @@ struct AirspyHFSettings { quint64 m_centerFrequency; quint32 m_devSampleRateIndex; - qint32 m_LOppmTenths; quint32 m_log2Decim; fcPos_t m_fcPos; - bool m_dcBlock; - bool m_iqCorrection; bool m_transverterMode; qint64 m_transverterDeltaFrequency; quint32 m_bandIndex;