1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00

HackRF input: link Tx frequency button and setting

This commit is contained in:
f4exb 2017-07-20 23:34:12 +02:00
parent 258515b5de
commit 5dac0b6712
8 changed files with 30 additions and 2 deletions

View File

@ -432,6 +432,8 @@ bool HackRFInput::applySettings(const HackRFInputSettings& settings, bool force)
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
}
m_settings.m_linkTxFrequency = settings.m_linkTxFrequency;
qDebug() << "HackRFInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
<< " device center freq: " << deviceCenterFrequency << " Hz"
<< " device sample rate: " << m_settings.m_devSampleRate << "S/s"

View File

@ -250,6 +250,12 @@ void HackRFInputGui::on_iqImbalance_toggled(bool checked)
sendSettings();
}
void HackRFInputGui::on_linkTxFreq_toggled(bool checked)
{
m_settings.m_linkTxFrequency = checked;
sendSettings();
}
void HackRFInputGui::on_bbFilter_currentIndexChanged(int index)
{
int newBandwidth = HackRFBandwidths::getBandwidth(index);

View File

@ -83,6 +83,7 @@ private slots:
void on_LOppm_valueChanged(int value);
void on_dcOffset_toggled(bool checked);
void on_iqImbalance_toggled(bool checked);
void on_linkTxFreq_toggled(bool checked);
void on_biasT_stateChanged(int state);
void on_decim_currentIndexChanged(int index);
void on_fcPos_currentIndexChanged(int index);

View File

@ -253,7 +253,7 @@
</property>
</widget>
</item>
<item row="0" column="4">
<item row="0" column="5">
<widget class="QCheckBox" name="biasT">
<property name="toolTip">
<string>Activate antenna bias tee</string>
@ -266,7 +266,7 @@
</property>
</widget>
</item>
<item row="0" column="5">
<item row="0" column="6">
<widget class="QCheckBox" name="lnaExt">
<property name="toolTip">
<string>Extra LNA +14dB</string>
@ -292,6 +292,20 @@
</property>
</spacer>
</item>
<item row="0" column="4">
<widget class="ButtonSwitch" name="linkTxFreq">
<property name="toolTip">
<string>Toggle Tx frequency link</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/link.png</normaloff>:/link.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>

View File

@ -39,6 +39,7 @@ void HackRFInputSettings::resetToDefaults()
m_dcBlock = false;
m_iqCorrection = false;
m_devSampleRate = 2400000;
m_linkTxFrequency = false;
}
QByteArray HackRFInputSettings::serialize() const
@ -56,6 +57,7 @@ QByteArray HackRFInputSettings::serialize() const
s.writeBool(10, m_dcBlock);
s.writeBool(11, m_iqCorrection);
s.writeU64(12, m_devSampleRate);
s.writeBool(13, m_linkTxFrequency);
return s.final();
}
@ -86,6 +88,7 @@ bool HackRFInputSettings::deserialize(const QByteArray& data)
d.readBool(10, &m_dcBlock, false);
d.readBool(11, &m_iqCorrection, false);
d.readU64(12, &m_devSampleRate, 2400000U);
d.readBool(11, &m_linkTxFrequency, false);
return true;
}

View File

@ -38,6 +38,7 @@ struct HackRFInputSettings {
bool m_lnaExt;
bool m_dcBlock;
bool m_iqCorrection;
bool m_linkTxFrequency;
HackRFInputSettings();
void resetToDefaults();

BIN
sdrbase/resources/link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

View File

@ -78,5 +78,6 @@
<file>filter_bandpass.png</file>
<file>stream.png</file>
<file>antenna.png</file>
<file>link.png</file>
</qresource>
</RCC>