1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 13:51:47 -05:00

Prevent use of not existent devices: removed default MIMO device setting

This commit is contained in:
f4exb 2020-05-20 11:26:30 +02:00
parent e79e11546c
commit 0c38888be1
2 changed files with 0 additions and 30 deletions

View File

@ -1871,21 +1871,6 @@ void MainWindow::sampleMIMOChanged()
deviceUI->m_deviceAPI->setSamplingDevicePluginInterface(
DeviceEnumerator::instance()->getMIMOPluginInterface(deviceUI->m_samplingDeviceControl->getSelectedDeviceIndex()));
if (deviceUI->m_deviceAPI->getSamplingDeviceId().size() == 0) // non existent device => replace by default
{
qDebug("MainWindow::sampleMIMOChanged: non existent device replaced by Test MIMO");
int testMIMODeviceIndex = DeviceEnumerator::instance()->getTestMIMODeviceIndex();
const PluginInterface::SamplingDevice *samplingDevice = DeviceEnumerator::instance()->getMIMOSamplingDevice(testMIMODeviceIndex);
deviceUI->m_deviceAPI->setSamplingDeviceSequence(samplingDevice->sequence);
deviceUI->m_deviceAPI->setDeviceNbItems(samplingDevice->deviceNbItems);
deviceUI->m_deviceAPI->setDeviceItemIndex(samplingDevice->deviceItemIndex);
deviceUI->m_deviceAPI->setHardwareId(samplingDevice->hardwareId);
deviceUI->m_deviceAPI->setSamplingDeviceId(samplingDevice->id);
deviceUI->m_deviceAPI->setSamplingDeviceSerial(samplingDevice->serial);
deviceUI->m_deviceAPI->setSamplingDeviceDisplayName(samplingDevice->displayedName);
deviceUI->m_deviceAPI->setSamplingDevicePluginInterface(DeviceEnumerator::instance()->getMIMOPluginInterface(testMIMODeviceIndex));
}
QString userArgs = m_settings.getDeviceUserArgs().findUserArgs(samplingDevice->hardwareId, samplingDevice->sequence);
if (userArgs.size() > 0) {

View File

@ -602,21 +602,6 @@ void MainCore::changeSampleMIMO(int deviceSetIndex, int selectedDeviceIndex)
deviceSet->m_deviceAPI->setSamplingDeviceDisplayName(samplingDevice->displayedName);
deviceSet->m_deviceAPI->setSamplingDevicePluginInterface(DeviceEnumerator::instance()->getMIMOPluginInterface(selectedDeviceIndex));
if (deviceSet->m_deviceAPI->getSamplingDeviceId().size() == 0) // non existent device => replace by default
{
qDebug("MainCore::changeSampleMIMO: non existent device replaced by Test MIMO");
int testMIMODeviceIndex = DeviceEnumerator::instance()->getTestMIMODeviceIndex();
const PluginInterface::SamplingDevice *samplingDevice = DeviceEnumerator::instance()->getMIMOSamplingDevice(testMIMODeviceIndex);
deviceSet->m_deviceAPI->setSamplingDeviceSequence(samplingDevice->sequence);
deviceSet->m_deviceAPI->setDeviceNbItems(samplingDevice->deviceNbItems);
deviceSet->m_deviceAPI->setDeviceItemIndex(samplingDevice->deviceItemIndex);
deviceSet->m_deviceAPI->setHardwareId(samplingDevice->hardwareId);
deviceSet->m_deviceAPI->setSamplingDeviceId(samplingDevice->id);
deviceSet->m_deviceAPI->setSamplingDeviceSerial(samplingDevice->serial);
deviceSet->m_deviceAPI->setSamplingDeviceDisplayName(samplingDevice->displayedName);
deviceSet->m_deviceAPI->setSamplingDevicePluginInterface(DeviceEnumerator::instance()->getMIMOPluginInterface(testMIMODeviceIndex));
}
QString userArgs = m_settings.getDeviceUserArgs().findUserArgs(samplingDevice->hardwareId, samplingDevice->sequence);
if (userArgs.size() > 0) {