mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
SDRPlay plugin: fixed preset load sequence
This commit is contained in:
parent
0a618e9f0b
commit
86d7d90450
@ -188,9 +188,10 @@ bool SDRPlayInput::handleMessage(const Message& message)
|
||||
const SDRPlaySettings& settings = conf.getSettings();
|
||||
|
||||
// change of sample rate needs full stop / start sequence that includes the standard apply settings
|
||||
if (m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex)
|
||||
// only if in started state (iff m_dev != 0)
|
||||
if ((m_dev != 0) && (m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex))
|
||||
{
|
||||
m_settings.m_devSampleRateIndex = settings.m_devSampleRateIndex;
|
||||
m_settings = settings;
|
||||
stop();
|
||||
start(m_devNumber);
|
||||
}
|
||||
@ -214,6 +215,7 @@ bool SDRPlayInput::handleMessage(const Message& message)
|
||||
bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool forwardChange, bool force)
|
||||
{
|
||||
bool forceGainSetting = false;
|
||||
//settings.debug("SDRPlayInput::applySettings");
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
|
||||
struct SDRPlaySettings {
|
||||
typedef enum {
|
||||
@ -47,6 +48,26 @@ struct SDRPlaySettings {
|
||||
void resetToDefaults();
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
|
||||
void debug(const char *title) const
|
||||
{
|
||||
qDebug() << QString(title)
|
||||
<< ": m_centerFrequency: " << m_centerFrequency
|
||||
<< " m_tunerGain: " << m_tunerGain
|
||||
<< " m_LOppmTenths: " << m_LOppmTenths
|
||||
<< " m_frequencyBandIndex: " << m_frequencyBandIndex
|
||||
<< " m_ifFrequencyIndex: " << m_ifFrequencyIndex
|
||||
<< " m_bandwidthIndex: " << m_bandwidthIndex
|
||||
<< " m_devSampleRateIndex: " << m_devSampleRateIndex
|
||||
<< " m_log2Decim: " << m_log2Decim
|
||||
<< " m_fcPos: " << m_fcPos
|
||||
<< " m_dcBlock: " << m_dcBlock
|
||||
<< " m_iqCorrection: " << m_iqCorrection
|
||||
<< " m_tunerGainMode: " << m_tunerGainMode
|
||||
<< " m_lnaOn: " << m_lnaOn
|
||||
<< " m_mixerAmpOn: " << m_mixerAmpOn
|
||||
<< " m_basebandGain: " << m_basebandGain;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _SDRPLAY_SDRPLAYSETTINGS_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user