kopia lustrzana https://github.com/f4exb/sdrangel
SDRPlay plugin: removed usless auto gain mode
rodzic
d68b34bd88
commit
b997f6ca39
|
@ -375,13 +375,6 @@ void SDRPlayGui::on_gain_valueChanged(int value)
|
|||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRPlayGui::on_gainAuto_toggled(bool checked)
|
||||
{
|
||||
qDebug("SDRPlayGui::on_gainAuto_toggled: %s", checked ? "on" : "off");
|
||||
m_settings.m_autoGain = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRPlayGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
|
|
|
@ -84,7 +84,6 @@ private slots:
|
|||
void on_decim_currentIndexChanged(int index);
|
||||
void on_fcPos_currentIndexChanged(int index);
|
||||
void on_gain_valueChanged(int value);
|
||||
void on_gainAuto_toggled(bool checked);
|
||||
void on_startStop_toggled(bool checked);
|
||||
void on_record_toggled(bool checked);
|
||||
};
|
||||
|
|
|
@ -552,7 +552,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string> </string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>000</string>
|
||||
|
@ -569,13 +569,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="ButtonSwitch" name="gainAuto">
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
|
|
@ -253,7 +253,6 @@ bool SDRPlayInput::handleMessage(const Message& message)
|
|||
bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool force)
|
||||
{
|
||||
bool forwardChange = false;
|
||||
bool forceManualGain = false;
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
|
@ -268,29 +267,7 @@ bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool force)
|
|||
m_deviceAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_autoGain != settings.m_autoGain) || force)
|
||||
{
|
||||
m_settings.m_autoGain = settings.m_autoGain;
|
||||
|
||||
if(m_dev != 0)
|
||||
{
|
||||
int r = mirisdr_set_tuner_gain_mode(m_dev, m_settings.m_autoGain ? 0 : 1);
|
||||
|
||||
if (r < 0)
|
||||
{
|
||||
qDebug("SDRPlayInput::applySettings: could not set auto gain %s: rc: %d", m_settings.m_autoGain ? "on" : "off", r);
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("SDRPlayInput::applySettings: auto gain set to %s", m_settings.m_autoGain ? "on" : "off");
|
||||
forceManualGain = !m_settings.m_autoGain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_settings.m_autoGain)
|
||||
{
|
||||
if ((m_settings.m_gain != settings.m_gain) || force || forceManualGain)
|
||||
if ((m_settings.m_gain != settings.m_gain) || force)
|
||||
{
|
||||
m_settings.m_gain = settings.m_gain;
|
||||
|
||||
|
@ -304,7 +281,6 @@ bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool force)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex) || force)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ void SDRPlaySettings::resetToDefaults()
|
|||
m_fcPos = FC_POS_CENTER;
|
||||
m_dcBlock = false;
|
||||
m_iqCorrection = false;
|
||||
m_autoGain = false;
|
||||
}
|
||||
|
||||
QByteArray SDRPlaySettings::serialize() const
|
||||
|
@ -54,7 +53,6 @@ QByteArray SDRPlaySettings::serialize() const
|
|||
s.writeS32(8, (int) m_fcPos);
|
||||
s.writeBool(9, m_dcBlock);
|
||||
s.writeBool(10, m_iqCorrection);
|
||||
s.writeBool(11, m_autoGain);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
@ -84,7 +82,6 @@ bool SDRPlaySettings::deserialize(const QByteArray& data)
|
|||
m_fcPos = (fcPos_t) intval;
|
||||
d.readBool(9, &m_dcBlock, false);
|
||||
d.readBool(10, &m_iqCorrection, false);
|
||||
d.readBool(11, &m_autoGain, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ struct SDRPlaySettings {
|
|||
fcPos_t m_fcPos;
|
||||
bool m_dcBlock;
|
||||
bool m_iqCorrection;
|
||||
bool m_autoGain;
|
||||
|
||||
SDRPlaySettings();
|
||||
void resetToDefaults();
|
||||
|
|
Ładowanie…
Reference in New Issue