1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00

AirspyHF: removed now useless LO ppm correction and DC and IQ corrections

This commit is contained in:
f4exb 2018-01-14 20:23:28 +01:00
parent 432f1524ac
commit 6384c88f8b
6 changed files with 12 additions and 132 deletions

View File

@ -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;

View File

@ -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);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
<width>324</width>
<height>180</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,7 +19,7 @@
<property name="minimumSize">
<size>
<width>320</width>
<height>220</height>
<height>180</height>
</size>
</property>
<property name="font">
@ -173,78 +173,22 @@
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_LOppm">
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="LOppmLabel">
<property name="toolTip">
<string>LO correction ppm</string>
</property>
<property name="text">
<string>LO ppm</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSlider" name="LOppm">
<property name="toolTip">
<string>Local Oscillator frequency correction (ppm)</string>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<widget class="Line" name="line_freq">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="LOppmText">
<property name="text">
<string>0.0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_corr">
<item row="0" column="1">
<widget class="ButtonSwitch" name="dcOffset">
<property name="toolTip">
<string>DC offset auto correction</string>
</property>
<item row="0" column="0">
<widget class="QLabel" name="bandLabel">
<property name="text">
<string>DC</string>
<string>Band</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="ButtonSwitch" name="iqImbalance">
<property name="toolTip">
<string>IQ imbalance auto correction</string>
</property>
<property name="text">
<string>IQ</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="corrLabal">
<property name="text">
<string>Auto</string>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="fcPosRightSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -257,7 +201,7 @@
</property>
</spacer>
</item>
<item row="0" column="6">
<item row="0" column="5">
<widget class="TransverterButton" name="transverter">
<property name="maximumSize">
<size>
@ -273,7 +217,7 @@
</property>
</widget>
</item>
<item row="0" column="5">
<item row="0" column="1">
<widget class="QComboBox" name="band">
<property name="maximumSize">
<size>
@ -296,22 +240,8 @@
</item>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="bandLabel">
<property name="text">
<string>Band</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_freq">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_samplerate">
<property name="spacing">

View File

@ -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<uint32_t>(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))

View File

@ -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);

View File

@ -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;