mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Bumped version to 3.12.0. Test Source: new combo box for auto correction options
This commit is contained in:
parent
1efc509296
commit
5f49dff49d
@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
|
|||||||
*/
|
*/
|
||||||
QCoreApplication::setOrganizationName("f4exb");
|
QCoreApplication::setOrganizationName("f4exb");
|
||||||
QCoreApplication::setApplicationName("SDRangel");
|
QCoreApplication::setApplicationName("SDRangel");
|
||||||
QCoreApplication::setApplicationVersion("3.11.1");
|
QCoreApplication::setApplicationVersion("3.12.0");
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
qApp->setStyle(QStyleFactory::create("fusion"));
|
qApp->setStyle(QStyleFactory::create("fusion"));
|
||||||
|
@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
|
|||||||
|
|
||||||
QCoreApplication::setOrganizationName("f4exb");
|
QCoreApplication::setOrganizationName("f4exb");
|
||||||
QCoreApplication::setApplicationName("SDRangelSrv");
|
QCoreApplication::setApplicationName("SDRangelSrv");
|
||||||
QCoreApplication::setApplicationVersion("3.11.1");
|
QCoreApplication::setApplicationVersion("3.12.0");
|
||||||
|
|
||||||
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
|
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
|
||||||
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));
|
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));
|
||||||
|
@ -139,19 +139,16 @@ void TestSourceGui::on_centerFrequency_changed(quint64 value)
|
|||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestSourceGui::on_dcOffset_toggled(bool checked)
|
void TestSourceGui::on_autoCorr_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
m_settings.m_dcBlock = checked;
|
if ((index < 0) || (index > TestSourceSettings::AutoCorrDCAndIQ)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_settings.m_autoCorrOptions = (TestSourceSettings::AutoCorrOptions) index;
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestSourceGui::on_iqImbalance_toggled(bool checked)
|
|
||||||
{
|
|
||||||
m_settings.m_iqImbalance = checked;
|
|
||||||
sendSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void TestSourceGui::on_frequencyShift_changed(qint64 value)
|
void TestSourceGui::on_frequencyShift_changed(qint64 value)
|
||||||
{
|
{
|
||||||
m_settings.m_frequencyShift = value;
|
m_settings.m_frequencyShift = value;
|
||||||
@ -355,9 +352,7 @@ void TestSourceGui::displaySettings()
|
|||||||
ui->iBiasText->setText(QString(tr("%1 %").arg(iBiasPercent)));
|
ui->iBiasText->setText(QString(tr("%1 %").arg(iBiasPercent)));
|
||||||
int qBiasPercent = roundf(m_settings.m_qFactor * 100.0f);
|
int qBiasPercent = roundf(m_settings.m_qFactor * 100.0f);
|
||||||
ui->qBiasText->setText(QString(tr("%1 %").arg(qBiasPercent)));
|
ui->qBiasText->setText(QString(tr("%1 %").arg(qBiasPercent)));
|
||||||
ui->dcOffset->setChecked(m_settings.m_dcBlock);
|
ui->autoCorr->setCurrentIndex(m_settings.m_autoCorrOptions);
|
||||||
ui->iqImbalance->setChecked(m_settings.m_iqImbalance);
|
|
||||||
|
|
||||||
ui->sampleSize->blockSignals(false);
|
ui->sampleSize->blockSignals(false);
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
@ -80,8 +80,7 @@ private slots:
|
|||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
void on_startStop_toggled(bool checked);
|
void on_startStop_toggled(bool checked);
|
||||||
void on_centerFrequency_changed(quint64 value);
|
void on_centerFrequency_changed(quint64 value);
|
||||||
void on_dcOffset_toggled(bool checked);
|
void on_autoCorr_currentIndexChanged(int index);
|
||||||
void on_iqImbalance_toggled(bool checked);
|
|
||||||
void on_frequencyShift_changed(qint64 value);
|
void on_frequencyShift_changed(qint64 value);
|
||||||
void on_decimation_currentIndexChanged(int index);
|
void on_decimation_currentIndexChanged(int index);
|
||||||
void on_fcPos_currentIndexChanged(int index);
|
void on_fcPos_currentIndexChanged(int index);
|
||||||
|
@ -190,22 +190,30 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="autoCorrLabel">
|
<widget class="QLabel" name="autoCorrLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Auto</string>
|
<string>Corr</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="ButtonSwitch" name="dcOffset">
|
<widget class="QComboBox" name="autoCorr">
|
||||||
<property name="text">
|
<property name="toolTip">
|
||||||
<string>DC</string>
|
<string>DC offset and IQ correction options</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="ButtonSwitch" name="iqImbalance">
|
|
||||||
<property name="text">
|
|
||||||
<string>IQ</string>
|
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>DC</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>DC+IQ</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -222,12 +222,21 @@ bool TestSourceInput::handleMessage(const Message& message)
|
|||||||
|
|
||||||
bool TestSourceInput::applySettings(const TestSourceSettings& settings, bool force)
|
bool TestSourceInput::applySettings(const TestSourceSettings& settings, bool force)
|
||||||
{
|
{
|
||||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || (m_settings.m_iqImbalance != settings.m_iqImbalance) || force)
|
if ((m_settings.m_autoCorrOptions != settings.m_autoCorrOptions) || force)
|
||||||
{
|
{
|
||||||
m_deviceAPI->configureCorrections(settings.m_dcBlock, settings.m_iqImbalance);
|
switch(settings.m_autoCorrOptions)
|
||||||
qDebug("TestSourceInput::applySettings: corrections: DC block: %s IQ imbalance: %s",
|
{
|
||||||
settings.m_dcBlock ? "true" : "false",
|
case TestSourceSettings::AutoCorrDC:
|
||||||
settings.m_iqImbalance ? "true" : "false");
|
m_deviceAPI->configureCorrections(true, false);
|
||||||
|
break;
|
||||||
|
case TestSourceSettings::AutoCorrDCAndIQ:
|
||||||
|
m_deviceAPI->configureCorrections(true, true);
|
||||||
|
break;
|
||||||
|
case TestSourceSettings::AutoCorrNone:
|
||||||
|
default:
|
||||||
|
m_deviceAPI->configureCorrections(false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_settings.m_sampleRate != settings.m_sampleRate) || force)
|
if ((m_settings.m_sampleRate != settings.m_sampleRate) || force)
|
||||||
|
@ -32,8 +32,7 @@ void TestSourceSettings::resetToDefaults()
|
|||||||
m_fcPos = FC_POS_CENTER;
|
m_fcPos = FC_POS_CENTER;
|
||||||
m_sampleSizeIndex = 0;
|
m_sampleSizeIndex = 0;
|
||||||
m_amplitudeBits = 127;
|
m_amplitudeBits = 127;
|
||||||
m_dcBlock = false;
|
m_autoCorrOptions = AutoCorrNone;
|
||||||
m_iqImbalance = false;
|
|
||||||
m_dcFactor = 0.0f;
|
m_dcFactor = 0.0f;
|
||||||
m_iFactor = 0.0f;
|
m_iFactor = 0.0f;
|
||||||
m_qFactor = 0.0f;
|
m_qFactor = 0.0f;
|
||||||
@ -50,8 +49,7 @@ QByteArray TestSourceSettings::serialize() const
|
|||||||
s.writeS32(5, (int) m_fcPos);
|
s.writeS32(5, (int) m_fcPos);
|
||||||
s.writeU32(6, m_sampleSizeIndex);
|
s.writeU32(6, m_sampleSizeIndex);
|
||||||
s.writeS32(7, m_amplitudeBits);
|
s.writeS32(7, m_amplitudeBits);
|
||||||
s.writeBool(8, m_dcBlock);
|
s.writeS32(8, (int) m_autoCorrOptions);
|
||||||
s.writeBool(9, m_iqImbalance);
|
|
||||||
s.writeFloat(10, m_dcFactor);
|
s.writeFloat(10, m_dcFactor);
|
||||||
s.writeFloat(11, m_iFactor);
|
s.writeFloat(11, m_iFactor);
|
||||||
s.writeFloat(12, m_qFactor);
|
s.writeFloat(12, m_qFactor);
|
||||||
@ -81,8 +79,14 @@ bool TestSourceSettings::deserialize(const QByteArray& data)
|
|||||||
m_fcPos = (fcPos_t) intval;
|
m_fcPos = (fcPos_t) intval;
|
||||||
d.readU32(6, &m_sampleSizeIndex, 0);
|
d.readU32(6, &m_sampleSizeIndex, 0);
|
||||||
d.readS32(7, &m_amplitudeBits, 128);
|
d.readS32(7, &m_amplitudeBits, 128);
|
||||||
d.readBool(8, &m_dcBlock, false);
|
d.readS32(8, &intval, 0);
|
||||||
d.readBool(9, &m_iqImbalance, false);
|
|
||||||
|
if (intval < 0 || intval > (int) AutoCorrDCAndIQ) {
|
||||||
|
m_autoCorrOptions = AutoCorrNone;
|
||||||
|
} else {
|
||||||
|
m_autoCorrOptions = (AutoCorrOptions) intval;
|
||||||
|
}
|
||||||
|
|
||||||
d.readFloat(10, &m_dcFactor, 0.0f);
|
d.readFloat(10, &m_dcFactor, 0.0f);
|
||||||
d.readFloat(11, &m_iFactor, 0.0f);
|
d.readFloat(11, &m_iFactor, 0.0f);
|
||||||
d.readFloat(12, &m_qFactor, 0.0f);
|
d.readFloat(12, &m_qFactor, 0.0f);
|
||||||
|
@ -24,6 +24,12 @@ struct TestSourceSettings {
|
|||||||
FC_POS_CENTER
|
FC_POS_CENTER
|
||||||
} fcPos_t;
|
} fcPos_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
AutoCorrNone,
|
||||||
|
AutoCorrDC,
|
||||||
|
AutoCorrDCAndIQ
|
||||||
|
} AutoCorrOptions;
|
||||||
|
|
||||||
quint64 m_centerFrequency;
|
quint64 m_centerFrequency;
|
||||||
qint32 m_frequencyShift;
|
qint32 m_frequencyShift;
|
||||||
quint32 m_sampleRate;
|
quint32 m_sampleRate;
|
||||||
@ -31,8 +37,7 @@ struct TestSourceSettings {
|
|||||||
fcPos_t m_fcPos;
|
fcPos_t m_fcPos;
|
||||||
quint32 m_sampleSizeIndex;
|
quint32 m_sampleSizeIndex;
|
||||||
qint32 m_amplitudeBits;
|
qint32 m_amplitudeBits;
|
||||||
bool m_dcBlock;
|
AutoCorrOptions m_autoCorrOptions;
|
||||||
bool m_iqImbalance;
|
|
||||||
float m_dcFactor; //!< -1.0 < x < 1.0
|
float m_dcFactor; //!< -1.0 < x < 1.0
|
||||||
float m_iFactor; //!< -1.0 < x < 1.0
|
float m_iFactor; //!< -1.0 < x < 1.0
|
||||||
float m_qFactor; //!< -1.0 < x < 1.0
|
float m_qFactor; //!< -1.0 < x < 1.0
|
||||||
|
Loading…
Reference in New Issue
Block a user