1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00

LimeSDR: fixed device pointer handling

This commit is contained in:
f4exb 2017-09-18 01:11:15 +02:00
parent b5a7a65d85
commit 116c5438e1
4 changed files with 8 additions and 14 deletions

View File

@ -30,7 +30,6 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent) :
ui(new Ui::LimeSDROutputGUI),
m_deviceAPI(deviceAPI),
m_settings(),
m_sampleSink(0),
m_sampleRate(0),
m_lastEngineState((DSPDeviceSinkEngine::State)-1),
m_doApplySettings(true),
@ -38,7 +37,6 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent) :
m_deviceStatusCounter(0)
{
m_limeSDROutput = (LimeSDROutput*) m_deviceAPI->getSampleSink();
m_deviceAPI->setSampleSink(m_sampleSink);
ui->setupUi(this);
@ -304,7 +302,7 @@ void LimeSDROutputGUI::updateHardware()
{
qDebug() << "LimeSDROutputGUI::updateHardware";
LimeSDROutput::MsgConfigureLimeSDR* message = LimeSDROutput::MsgConfigureLimeSDR::create(m_settings);
m_sampleSink->getInputMessageQueue()->push(message);
m_limeSDROutput->getInputMessageQueue()->push(message);
m_updateTimer.stop();
}
}
@ -344,7 +342,7 @@ void LimeSDROutputGUI::updateStatus()
else
{
LimeSDROutput::MsgGetStreamInfo* message = LimeSDROutput::MsgGetStreamInfo::create();
m_sampleSink->getInputMessageQueue()->push(message);
m_limeSDROutput->getInputMessageQueue()->push(message);
m_statusCounter = 0;
}
@ -357,7 +355,7 @@ void LimeSDROutputGUI::updateStatus()
if (m_deviceAPI->isBuddyLeader())
{
LimeSDROutput::MsgGetDeviceInfo* message = LimeSDROutput::MsgGetDeviceInfo::create();
m_sampleSink->getInputMessageQueue()->push(message);
m_limeSDROutput->getInputMessageQueue()->push(message);
}
m_deviceStatusCounter = 0;

View File

@ -59,7 +59,6 @@ private:
LimeSDROutputSettings m_settings;
QTimer m_updateTimer;
QTimer m_statusTimer;
DeviceSampleSink* m_sampleSink;
int m_sampleRate;
quint64 m_deviceCenterFrequency; //!< Center frequency in device
int m_lastEngineState;

View File

@ -33,15 +33,13 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceSourceAPI *deviceAPI, QWidget* parent) :
ui(new Ui::LimeSDRInputGUI),
m_deviceAPI(deviceAPI),
m_settings(),
m_sampleSource(0),
m_sampleRate(0),
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
m_doApplySettings(true),
m_statusCounter(0),
m_deviceStatusCounter(0)
{
m_sampleSource = m_deviceAPI->getSampleSource();
m_limeSDRInput = (LimeSDRInput*) m_sampleSource;
m_limeSDRInput = (LimeSDRInput*) m_deviceAPI->getSampleSource();
ui->setupUi(this);
@ -327,7 +325,7 @@ void LimeSDRInputGUI::updateHardware()
{
qDebug() << "LimeSDRInputGUI::updateHardware";
LimeSDRInput::MsgConfigureLimeSDR* message = LimeSDRInput::MsgConfigureLimeSDR::create(m_settings);
m_sampleSource->getInputMessageQueue()->push(message);
m_limeSDRInput->getInputMessageQueue()->push(message);
m_updateTimer.stop();
}
}
@ -367,7 +365,7 @@ void LimeSDRInputGUI::updateStatus()
else
{
LimeSDRInput::MsgGetStreamInfo* message = LimeSDRInput::MsgGetStreamInfo::create();
m_sampleSource->getInputMessageQueue()->push(message);
m_limeSDRInput->getInputMessageQueue()->push(message);
m_statusCounter = 0;
}
@ -380,7 +378,7 @@ void LimeSDRInputGUI::updateStatus()
if (m_deviceAPI->isBuddyLeader())
{
LimeSDRInput::MsgGetDeviceInfo* message = LimeSDRInput::MsgGetDeviceInfo::create();
m_sampleSource->getInputMessageQueue()->push(message);
m_limeSDRInput->getInputMessageQueue()->push(message);
}
m_deviceStatusCounter = 0;
@ -418,7 +416,7 @@ void LimeSDRInputGUI::on_record_toggled(bool checked)
}
LimeSDRInput::MsgFileRecord* message = LimeSDRInput::MsgFileRecord::create(checked);
m_sampleSource->getInputMessageQueue()->push(message);
m_limeSDRInput->getInputMessageQueue()->push(message);
}
void LimeSDRInputGUI::on_centerFrequency_changed(quint64 value)

View File

@ -58,7 +58,6 @@ private:
LimeSDRInputSettings m_settings;
QTimer m_updateTimer;
QTimer m_statusTimer;
DeviceSampleSource* m_sampleSource;
int m_sampleRate;
quint64 m_deviceCenterFrequency; //!< Center frequency in device
int m_lastEngineState;