mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
FCD Pro: force settings at startup and on deserialize
This commit is contained in:
parent
4e6654e4b4
commit
a4ea78f037
@ -22,8 +22,8 @@ const char *fcd_traits<ProPlus>::displayedName = "FunCube Dongle Pro+";
|
||||
const char *fcd_traits<Pro>::pluginDisplayedName = "FunCube Pro Input";
|
||||
const char *fcd_traits<ProPlus>::pluginDisplayedName = "FunCube Pro+ Input";
|
||||
|
||||
const char *fcd_traits<Pro>::pluginVersion = "3.7.3";
|
||||
const char *fcd_traits<ProPlus>::pluginVersion = "3.7.3";
|
||||
const char *fcd_traits<Pro>::pluginVersion = "3.7.4";
|
||||
const char *fcd_traits<ProPlus>::pluginVersion = "3.7.4";
|
||||
|
||||
const int64_t fcd_traits<Pro>::loLowLimitFreq = 64000000L;
|
||||
const int64_t fcd_traits<ProPlus>::loLowLimitFreq = 150000L;
|
||||
|
@ -31,6 +31,7 @@ FCDProGui::FCDProGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FCDProGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(NULL),
|
||||
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
|
||||
@ -195,6 +196,7 @@ bool FCDProGui::deserialize(const QByteArray& data)
|
||||
if(m_settings.deserialize(data))
|
||||
{
|
||||
displaySettings();
|
||||
m_forceSettings = true;
|
||||
sendSettings();
|
||||
return true;
|
||||
}
|
||||
@ -500,8 +502,9 @@ void FCDProGui::updateStatus()
|
||||
|
||||
void FCDProGui::updateHardware()
|
||||
{
|
||||
FCDProInput::MsgConfigureFCD* message = FCDProInput::MsgConfigureFCD::create(m_settings);
|
||||
FCDProInput::MsgConfigureFCD* message = FCDProInput::MsgConfigureFCD::create(m_settings, m_forceSettings);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
m_forceSettings = false;
|
||||
m_updateTimer.stop();
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,7 @@ private:
|
||||
Ui::FCDProGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
bool m_forceSettings;
|
||||
FCDProSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
QTimer m_statusTimer;
|
||||
|
@ -175,7 +175,7 @@ bool FCDProInput::handleMessage(const Message& message)
|
||||
{
|
||||
qDebug() << "FCDProInput::handleMessage: MsgConfigureFCD";
|
||||
MsgConfigureFCD& conf = (MsgConfigureFCD&) message;
|
||||
applySettings(conf.getSettings(), false);
|
||||
applySettings(conf.getSettings(), conf.getForce());
|
||||
return true;
|
||||
}
|
||||
else if (MsgFileRecord::match(message))
|
||||
|
@ -41,18 +41,21 @@ public:
|
||||
|
||||
public:
|
||||
const FCDProSettings& getSettings() const { return m_settings; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureFCD* create(const FCDProSettings& settings)
|
||||
static MsgConfigureFCD* create(const FCDProSettings& settings, bool force)
|
||||
{
|
||||
return new MsgConfigureFCD(settings);
|
||||
return new MsgConfigureFCD(settings, force);
|
||||
}
|
||||
|
||||
private:
|
||||
FCDProSettings m_settings;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureFCD(const FCDProSettings& settings) :
|
||||
MsgConfigureFCD(const FCDProSettings& settings, bool force) :
|
||||
Message(),
|
||||
m_settings(settings)
|
||||
m_settings(settings),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user