mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-13 03:41:47 -05:00
Added DC block and IQ correction buttons to BladeRF
This commit is contained in:
parent
d2a41a5b9d
commit
b31033c0a2
@ -140,6 +140,8 @@ void AirspyGui::displaySettings()
|
||||
ui->sampleRate->setCurrentIndex(m_settings.m_devSampleRateIndex);
|
||||
|
||||
ui->biasT->setChecked(m_settings.m_biasT);
|
||||
ui->dcOffset->setChecked(m_settings.m_dcBlock);
|
||||
ui->iqImbalance->setChecked(m_settings.m_iqCorrection);
|
||||
|
||||
ui->decimText->setText(tr("%1").arg(1<<m_settings.m_log2Decim));
|
||||
ui->decim->setValue(m_settings.m_log2Decim);
|
||||
|
@ -114,6 +114,9 @@ void BladerfGui::displaySettings()
|
||||
{
|
||||
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
|
||||
|
||||
ui->dcOffset->setChecked(m_settings.m_dcBlock);
|
||||
ui->iqImbalance->setChecked(m_settings.m_iqCorrection);
|
||||
|
||||
ui->samplerateText->setText(tr("%1k").arg(m_settings.m_devSampleRate / 1000));
|
||||
unsigned int sampleRateIndex = BladerfSampleRates::getRateIndex(m_settings.m_devSampleRate);
|
||||
ui->samplerate->setValue(sampleRateIndex);
|
||||
@ -151,6 +154,18 @@ void BladerfGui::on_centerFrequency_changed(quint64 value)
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void BladerfGui::on_dcOffset_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_dcBlock = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void BladerfGui::on_iqImbalance_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_iqCorrection = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void BladerfGui::on_samplerate_valueChanged(int value)
|
||||
{
|
||||
int newrate = BladerfSampleRates::getRate(value);
|
||||
|
@ -62,6 +62,8 @@ private:
|
||||
|
||||
private slots:
|
||||
void on_centerFrequency_changed(quint64 value);
|
||||
void on_dcOffset_toggled(bool checked);
|
||||
void on_iqImbalance_toggled(bool checked);
|
||||
void on_samplerate_valueChanged(int value);
|
||||
void on_bandwidth_valueChanged(int value);
|
||||
void on_decim_valueChanged(int value);
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>198</width>
|
||||
<height>280</height>
|
||||
<width>247</width>
|
||||
<height>308</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -96,6 +96,37 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_corr">
|
||||
<item row="0" column="2">
|
||||
<widget class="ButtonSwitch" name="iqImbalance">
|
||||
<property name="toolTip">
|
||||
<string>Automatic IQ imbalance correction</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IQ imbalance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ButtonSwitch" name="dcOffset">
|
||||
<property name="toolTip">
|
||||
<string>Automatic DC offset removal</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DC offset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="corrLabel">
|
||||
<property name="text">
|
||||
<string>Auto corr</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_freq">
|
||||
<property name="orientation">
|
||||
@ -606,6 +637,11 @@
|
||||
<header>gui/valuedial.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -177,6 +177,18 @@ bool BladerfInput::applySettings(const BladeRFSettings& settings, bool force)
|
||||
|
||||
qDebug() << "BladerfInput::applySettings: m_dev: " << m_dev;
|
||||
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_lnaGain != settings.m_lnaGain) || force)
|
||||
{
|
||||
m_settings.m_lnaGain = settings.m_lnaGain;
|
||||
|
Loading…
Reference in New Issue
Block a user