kopia lustrzana https://github.com/f4exb/sdrangel
Prevent use of not existent devices: removed default MIMO device setting
rodzic
e79e11546c
commit
0c38888be1
|
@ -1871,21 +1871,6 @@ void MainWindow::sampleMIMOChanged()
|
||||||
deviceUI->m_deviceAPI->setSamplingDevicePluginInterface(
|
deviceUI->m_deviceAPI->setSamplingDevicePluginInterface(
|
||||||
DeviceEnumerator::instance()->getMIMOPluginInterface(deviceUI->m_samplingDeviceControl->getSelectedDeviceIndex()));
|
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);
|
QString userArgs = m_settings.getDeviceUserArgs().findUserArgs(samplingDevice->hardwareId, samplingDevice->sequence);
|
||||||
|
|
||||||
if (userArgs.size() > 0) {
|
if (userArgs.size() > 0) {
|
||||||
|
|
|
@ -602,21 +602,6 @@ void MainCore::changeSampleMIMO(int deviceSetIndex, int selectedDeviceIndex)
|
||||||
deviceSet->m_deviceAPI->setSamplingDeviceDisplayName(samplingDevice->displayedName);
|
deviceSet->m_deviceAPI->setSamplingDeviceDisplayName(samplingDevice->displayedName);
|
||||||
deviceSet->m_deviceAPI->setSamplingDevicePluginInterface(DeviceEnumerator::instance()->getMIMOPluginInterface(selectedDeviceIndex));
|
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);
|
QString userArgs = m_settings.getDeviceUserArgs().findUserArgs(samplingDevice->hardwareId, samplingDevice->sequence);
|
||||||
|
|
||||||
if (userArgs.size() > 0) {
|
if (userArgs.size() > 0) {
|
||||||
|
|
Ładowanie…
Reference in New Issue