mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
FCD Pro+: implemented DC block and IQ imbalance buttons
This commit is contained in:
parent
a25fa4ef97
commit
6616f92a36
@ -104,6 +104,8 @@ bool FCDProPlusGui::handleMessage(const Message& message)
|
||||
void FCDProPlusGui::displaySettings()
|
||||
{
|
||||
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
|
||||
ui->dcOffset->setChecked(m_settings.m_dcBlock);
|
||||
ui->iqImbalance->setChecked(m_settings.m_iqImbalance);
|
||||
ui->checkBoxG->setChecked(m_settings.m_lnaGain);
|
||||
ui->checkBoxB->setChecked(m_settings.m_biasT);
|
||||
ui->mixGain->setChecked(m_settings.m_mixGain);
|
||||
@ -127,6 +129,18 @@ void FCDProPlusGui::on_centerFrequency_changed(quint64 value)
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void FCDProPlusGui::on_dcOffset_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_dcBlock = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void FCDProPlusGui::on_iqImbalance_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_iqImbalance = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void FCDProPlusGui::updateHardware()
|
||||
{
|
||||
FCDProPlusInput::MsgConfigureFCD* message = FCDProPlusInput::MsgConfigureFCD::create(m_settings);
|
||||
|
@ -45,6 +45,8 @@ private:
|
||||
|
||||
private slots:
|
||||
void on_centerFrequency_changed(quint64 value);
|
||||
void on_dcOffset_toggled(bool checked);
|
||||
void on_iqImbalance_toggled(bool checked);
|
||||
void on_checkBoxG_stateChanged(int state);
|
||||
void on_checkBoxB_stateChanged(int state);
|
||||
void on_mixGain_stateChanged(int state);
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>190</width>
|
||||
<height>137</height>
|
||||
<width>249</width>
|
||||
<height>159</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -93,6 +93,74 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="ppmLabel">
|
||||
<property name="text">
|
||||
<string>LO ppm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="ppm">
|
||||
<property name="toolTip">
|
||||
<string>LO ppm correction</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ppmText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_corr">
|
||||
<item>
|
||||
<widget class="QLabel" name="corrLabel">
|
||||
<property name="text">
|
||||
<string>Auto corr</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<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>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
@ -137,7 +205,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_IF">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="ifGainLabel">
|
||||
<property name="text">
|
||||
<string>IF gain</string>
|
||||
</property>
|
||||
@ -166,44 +234,14 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_filters">
|
||||
<item>
|
||||
<widget class="QLabel" name="ppmLabel">
|
||||
<widget class="QLabel" name="filterRFLabel">
|
||||
<property name="text">
|
||||
<string>LO ppm</string>
|
||||
<string>RF filt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="ppm">
|
||||
<property name="toolTip">
|
||||
<string>LO ppm correction</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ppmText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QComboBox" name="filterRF">
|
||||
<property name="toolTip">
|
||||
@ -211,6 +249,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="filterIFLabel">
|
||||
<property name="text">
|
||||
<string>IF filt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="filterIF">
|
||||
<property name="toolTip">
|
||||
@ -218,6 +263,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_filt">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -229,6 +287,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/>
|
||||
|
@ -229,6 +229,18 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqImbalance != settings.m_iqImbalance) || force)
|
||||
{
|
||||
m_settings.m_iqImbalance = settings.m_iqImbalance;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if (signalChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits<ProPlus>::sampleRate, m_settings.m_centerFrequency);
|
||||
|
@ -48,6 +48,8 @@ QByteArray FCDProPlusSettings::serialize() const
|
||||
s.writeS32(5, m_rfFilterIndex);
|
||||
s.writeBool(6, m_dcBlock);
|
||||
s.writeBool(7, m_iqImbalance);
|
||||
s.writeS32(8, m_LOppmTenths);
|
||||
s.writeU32(9, m_ifGain);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -73,6 +75,8 @@ bool FCDProPlusSettings::deserialize(const QByteArray& data)
|
||||
d.readS32(5, &m_rfFilterIndex, 0);
|
||||
d.readBool(6, &m_dcBlock, false);
|
||||
d.readBool(7, &m_iqImbalance, false);
|
||||
d.readS32(8, &m_LOppmTenths, 0);
|
||||
d.readU32(9, &m_ifGain, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user