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

HackRF: changed placement of input object creation in the GUI

This commit is contained in:
f4exb 2017-04-14 02:16:04 +02:00
parent 0a29f34b94
commit 00cf437bf2
2 changed files with 8 additions and 9 deletions

View File

@ -38,7 +38,10 @@ HackRFOutputGui::HackRFOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
m_deviceSampleSink(0),
m_lastEngineState((DSPDeviceSinkEngine::State)-1)
{
ui->setupUi(this);
m_deviceSampleSink = new HackRFOutput(m_deviceAPI);
m_deviceAPI->setSink(m_deviceSampleSink);
ui->setupUi(this);
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
ui->centerFrequency->setValueRange(7, 0U, 7250000U);
@ -50,13 +53,8 @@ HackRFOutputGui::HackRFOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
m_statusTimer.start(500);
displaySettings();
m_deviceSampleSink = new HackRFOutput(m_deviceAPI);
displayBandwidths();
m_deviceAPI->setSink(m_deviceSampleSink);
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
}

View File

@ -39,7 +39,10 @@ HackRFInputGui::HackRFInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
m_sampleSource(NULL),
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
{
ui->setupUi(this);
m_sampleSource = new HackRFInput(m_deviceAPI);
m_deviceAPI->setSource(m_sampleSource);
ui->setupUi(this);
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
ui->centerFrequency->setValueRange(7, 0U, 7250000U);
@ -52,11 +55,9 @@ HackRFInputGui::HackRFInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
displaySettings();
m_sampleSource = new HackRFInput(m_deviceAPI);
displayBandwidths();
m_deviceAPI->setSource(m_sampleSource);
char recFileNameCStr[30];
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());