mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
Split button added, swagger changed manually, but should be the same when regenerated
This commit is contained in:
@@ -969,8 +969,14 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, const QLi
|
||||
if (settingsKeys.contains("devSampleRate")
|
||||
|| settingsKeys.contains("log2HardDecim") || force)
|
||||
{
|
||||
forwardChangeAllDSP = true; //m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
|
||||
|
||||
if(!settings.m_splitFreq) {
|
||||
forwardChangeAllDSP = true; //m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
qDebug() << "LimeSDRInput::applySettings: Split is false, val:" << settings.m_splitFreq;
|
||||
}else{
|
||||
forwardChangeRxDSP = m_settings.m_log2HardDecim != settings.m_log2HardDecim;
|
||||
forwardChangeAllDSP = m_settings.m_devSampleRate != settings.m_devSampleRate;
|
||||
}
|
||||
if (m_deviceShared.m_deviceParams->getDevice() && m_channelAcquired)
|
||||
{
|
||||
if (LMS_SetSampleRateDir(m_deviceShared.m_deviceParams->getDevice(),
|
||||
@@ -1439,6 +1445,9 @@ void LimeSDRInput::webapiUpdateDeviceSettings(
|
||||
if (deviceSettingsKeys.contains("dcBlock")) {
|
||||
settings.m_dcBlock = response.getLimeSdrInputSettings()->getDcBlock() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("splitFreq")) {
|
||||
settings.m_splitFreq = response.getLimeSdrInputSettings()->getSplitFreq() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("devSampleRate")) {
|
||||
settings.m_devSampleRate = response.getLimeSdrInputSettings()->getDevSampleRate();
|
||||
}
|
||||
@@ -1521,6 +1530,7 @@ void LimeSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
|
||||
response.getLimeSdrInputSettings()->setAntennaPath((int) settings.m_antennaPath);
|
||||
response.getLimeSdrInputSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||
response.getLimeSdrInputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
response.getLimeSdrInputSettings()->setSplitFreq(settings.m_splitFreq ? 1 : 0);
|
||||
response.getLimeSdrInputSettings()->setDevSampleRate(settings.m_devSampleRate);
|
||||
response.getLimeSdrInputSettings()->setExtClock(settings.m_extClock ? 1 : 0);
|
||||
response.getLimeSdrInputSettings()->setExtClockFreq(settings.m_extClockFreq);
|
||||
@@ -1653,6 +1663,9 @@ void LimeSDRInput::webapiReverseSendSettings(const QList<QString>& deviceSetting
|
||||
if (deviceSettingsKeys.contains("dcBlock") || force) {
|
||||
swgLimeSdrInputSettings->setDcBlock(settings.m_dcBlock ? 1 : 0);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("splitFreq") || force) {
|
||||
swgLimeSdrInputSettings->setSplitFreq(settings.m_splitFreq ? 1 : 0);
|
||||
}
|
||||
if (deviceSettingsKeys.contains("devSampleRate") || force) {
|
||||
swgLimeSdrInputSettings->setDevSampleRate(settings.m_devSampleRate);
|
||||
}
|
||||
|
||||
@@ -428,6 +428,7 @@ void LimeSDRInputGUI::displaySettings()
|
||||
displaySampleRate();
|
||||
|
||||
ui->dcOffset->setChecked(m_settings.m_dcBlock);
|
||||
ui->splitFreq->setChecked(m_settings.m_splitFreq);
|
||||
ui->iqImbalance->setChecked(m_settings.m_iqCorrection);
|
||||
|
||||
ui->hwDecim->setCurrentIndex(m_settings.m_log2HardDecim);
|
||||
@@ -635,6 +636,13 @@ void LimeSDRInputGUI::on_dcOffset_toggled(bool checked)
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LimeSDRInputGUI::on_splitFreq_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_splitFreq = checked;
|
||||
m_settingsKeys.append("splitFreq");
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LimeSDRInputGUI::on_iqImbalance_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_iqCorrection = checked;
|
||||
@@ -939,6 +947,7 @@ void LimeSDRInputGUI::makeUIConnections()
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &LimeSDRInputGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->splitFreq, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_splitFreq_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &LimeSDRInputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->hwDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRInputGUI::on_hwDecim_currentIndexChanged);
|
||||
|
||||
@@ -89,6 +89,7 @@ private slots:
|
||||
void on_ncoFrequency_changed(qint64 value);
|
||||
void on_ncoEnable_toggled(bool checked);
|
||||
void on_dcOffset_toggled(bool checked);
|
||||
void on_splitFreq_toggled(bool checked);
|
||||
void on_iqImbalance_toggled(bool checked);
|
||||
void on_sampleRate_changed(quint64 value);
|
||||
void on_hwDecim_currentIndexChanged(int index);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>360</width>
|
||||
<width>386</width>
|
||||
<height>255</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -312,6 +312,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ButtonSwitch" name="splitFreq">
|
||||
<property name="toolTip">
|
||||
<string>Disable RX/TX frequency being locked</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Split</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -31,6 +31,7 @@ void LimeSDRInputSettings::resetToDefaults()
|
||||
m_devSampleRate = 5000000;
|
||||
m_log2HardDecim = 3;
|
||||
m_dcBlock = false;
|
||||
m_splitFreq = false;
|
||||
m_iqCorrection = false;
|
||||
m_log2SoftDecim = 0;
|
||||
m_lpfBW = 4.5e6f;
|
||||
@@ -96,6 +97,7 @@ QByteArray LimeSDRInputSettings::serialize() const
|
||||
s.writeFloat(30, m_replayLength);
|
||||
s.writeFloat(31, m_replayStep);
|
||||
s.writeBool(32, m_replayLoop);
|
||||
s.writeBool(33, m_splitFreq);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -158,6 +160,7 @@ bool LimeSDRInputSettings::deserialize(const QByteArray& data)
|
||||
d.readFloat(30, &m_replayLength, 20.0f);
|
||||
d.readFloat(31, &m_replayStep, 5.0f);
|
||||
d.readBool(32, &m_replayLoop, false);
|
||||
d.readBool(33, &m_splitFreq, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -183,6 +186,9 @@ void LimeSDRInputSettings::applySettings(const QStringList& settingsKeys, const
|
||||
if (settingsKeys.contains("dcBlock")) {
|
||||
m_dcBlock = settings.m_dcBlock;
|
||||
}
|
||||
if (settingsKeys.contains("splitFreq")) {
|
||||
m_splitFreq = settings.m_splitFreq;
|
||||
}
|
||||
if (settingsKeys.contains("iqCorrection")) {
|
||||
m_iqCorrection = settings.m_iqCorrection;
|
||||
}
|
||||
@@ -285,6 +291,9 @@ QString LimeSDRInputSettings::getDebugString(const QStringList& settingsKeys, bo
|
||||
if (settingsKeys.contains("dcBlock") || force) {
|
||||
ostr << " m_dcBlock: " << m_dcBlock;
|
||||
}
|
||||
if (settingsKeys.contains("splitFreq") || force) {
|
||||
ostr << " m_splitFreq: " << m_splitFreq;
|
||||
}
|
||||
if (settingsKeys.contains("iqCorrection") || force) {
|
||||
ostr << " m_iqCorrection: " << m_iqCorrection;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ struct LimeSDRInputSettings
|
||||
uint32_t m_log2HardDecim;
|
||||
// channel settings
|
||||
bool m_dcBlock;
|
||||
bool m_splitFreq;
|
||||
bool m_iqCorrection;
|
||||
uint32_t m_log2SoftDecim;
|
||||
float m_lpfBW; //!< LMS amalog lowpass filter bandwidth (Hz)
|
||||
|
||||
Reference in New Issue
Block a user