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