1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

PluginManager::selectSampleSourceByIndex set device details (incl serial) before trying to open the device so it can work...

This commit is contained in:
f4exb 2017-04-23 10:32:15 +02:00
parent 79515407e1
commit 851461b8f3

View File

@ -375,14 +375,15 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceSourceAPI *deviceA
deviceAPI->stopAcquisition();
deviceAPI->setSampleSourcePluginGUI(0); // this effectively destroys the previous GUI if it exists
QWidget *gui;
PluginGUI *pluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceDevices[index].m_deviceId, &gui, deviceAPI);
// m_sampleSourcePluginGUI = pluginGUI;
deviceAPI->setSampleSourceSequence(m_sampleSourceDevices[index].m_deviceSequence);
deviceAPI->setHardwareId(m_sampleSourceDevices[index].m_hadrwareId);
deviceAPI->setSampleSourceId(m_sampleSourceDevices[index].m_deviceId);
deviceAPI->setSampleSourceSerial(m_sampleSourceDevices[index].m_deviceSerial);
QWidget *gui;
PluginGUI *pluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceDevices[index].m_deviceId, &gui, deviceAPI);
// m_sampleSourcePluginGUI = pluginGUI;
deviceAPI->setSampleSourcePluginGUI(pluginGUI);
deviceAPI->setInputGUI(gui, m_sampleSourceDevices[index].m_displayName);