kopia lustrzana https://github.com/f4exb/sdrangel
RTL-SDR: force settings at startup and on deserialize
rodzic
edb2ae985f
commit
9eee869ccd
|
@ -33,6 +33,7 @@ RTLSDRGui::RTLSDRGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
|||
QWidget(parent),
|
||||
ui(new Ui::RTLSDRGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(0),
|
||||
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||
|
@ -117,6 +118,7 @@ bool RTLSDRGui::deserialize(const QByteArray& data)
|
|||
{
|
||||
displayGains();
|
||||
displaySettings();
|
||||
m_forceSettings = true;
|
||||
sendSettings();
|
||||
return true;
|
||||
}
|
||||
|
@ -345,8 +347,9 @@ void RTLSDRGui::on_transverter_clicked()
|
|||
|
||||
void RTLSDRGui::updateHardware()
|
||||
{
|
||||
RTLSDRInput::MsgConfigureRTLSDR* message = RTLSDRInput::MsgConfigureRTLSDR::create(m_settings);
|
||||
RTLSDRInput::MsgConfigureRTLSDR* message = RTLSDRInput::MsgConfigureRTLSDR::create(m_settings, m_forceSettings);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
m_forceSettings = false;
|
||||
m_updateTimer.stop();
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ private:
|
|||
Ui::RTLSDRGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
bool m_forceSettings;
|
||||
RTLSDRSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
QTimer m_statusTimer;
|
||||
|
|
|
@ -249,7 +249,7 @@ bool RTLSDRInput::handleMessage(const Message& message)
|
|||
MsgConfigureRTLSDR& conf = (MsgConfigureRTLSDR&) message;
|
||||
qDebug() << "RTLSDRInput::handleMessage: MsgConfigureRTLSDR";
|
||||
|
||||
bool success = applySettings(conf.getSettings(), false);
|
||||
bool success = applySettings(conf.getSettings(), conf.getForce());
|
||||
|
||||
if (!success)
|
||||
{
|
||||
|
|
|
@ -35,18 +35,21 @@ public:
|
|||
|
||||
public:
|
||||
const RTLSDRSettings& getSettings() const { return m_settings; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureRTLSDR* create(const RTLSDRSettings& settings)
|
||||
static MsgConfigureRTLSDR* create(const RTLSDRSettings& settings, bool force)
|
||||
{
|
||||
return new MsgConfigureRTLSDR(settings);
|
||||
return new MsgConfigureRTLSDR(settings, force);
|
||||
}
|
||||
|
||||
private:
|
||||
RTLSDRSettings m_settings;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureRTLSDR(const RTLSDRSettings& settings) :
|
||||
MsgConfigureRTLSDR(const RTLSDRSettings& settings, bool force) :
|
||||
Message(),
|
||||
m_settings(settings)
|
||||
m_settings(settings),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
const PluginDescriptor RTLSDRPlugin::m_pluginDescriptor = {
|
||||
QString("RTL-SDR Input"),
|
||||
QString("3.7.3"),
|
||||
QString("3.7.4"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
|
Ładowanie…
Reference in New Issue