mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 13:47:50 -04:00
Multiple transmission channels warning when adding more than one channel
This commit is contained in:
parent
03ff449ec8
commit
35b6409753
@ -72,6 +72,11 @@ void DeviceSinkAPI::removeThreadedSource(ThreadedBasebandSampleSource* source)
|
|||||||
m_deviceSinkEngine->removeThreadedSource(source);
|
m_deviceSinkEngine->removeThreadedSource(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t DeviceSinkAPI::getNumberOfSources()
|
||||||
|
{
|
||||||
|
return m_deviceSinkEngine->getNumberOfSources();
|
||||||
|
}
|
||||||
|
|
||||||
void DeviceSinkAPI::setSink(DeviceSampleSink* sink)
|
void DeviceSinkAPI::setSink(DeviceSampleSink* sink)
|
||||||
{
|
{
|
||||||
m_deviceSinkEngine->setSink(sink);
|
m_deviceSinkEngine->setSink(sink);
|
||||||
|
@ -47,6 +47,7 @@ public:
|
|||||||
void removeSource(BasebandSampleSource* sink); //!< Remove a baseband sample source from device engine
|
void removeSource(BasebandSampleSource* sink); //!< Remove a baseband sample source from device engine
|
||||||
void addThreadedSource(ThreadedBasebandSampleSource* sink); //!< Add a baseband sample source that will run on its own thread to device engine
|
void addThreadedSource(ThreadedBasebandSampleSource* sink); //!< Add a baseband sample source that will run on its own thread to device engine
|
||||||
void removeThreadedSource(ThreadedBasebandSampleSource* sink); //!< Remove a baseband sample source that runs on its own thread from device engine
|
void removeThreadedSource(ThreadedBasebandSampleSource* sink); //!< Remove a baseband sample source that runs on its own thread from device engine
|
||||||
|
uint32_t getNumberOfSources();
|
||||||
void setSink(DeviceSampleSink* sink); //!< Set device engine sample sink type
|
void setSink(DeviceSampleSink* sink); //!< Set device engine sample sink type
|
||||||
bool initGeneration(); //!< Initialize device engine generation sequence
|
bool initGeneration(); //!< Initialize device engine generation sequence
|
||||||
bool startGeneration(); //!< Start device engine generation sequence
|
bool startGeneration(); //!< Start device engine generation sequence
|
||||||
|
@ -72,6 +72,8 @@ public:
|
|||||||
void addThreadedSource(ThreadedBasebandSampleSource* source); //!< Add a baseband sample source that will run on its own thread
|
void addThreadedSource(ThreadedBasebandSampleSource* source); //!< Add a baseband sample source that will run on its own thread
|
||||||
void removeThreadedSource(ThreadedBasebandSampleSource* source); //!< Remove a baseband sample source that runs on its own thread
|
void removeThreadedSource(ThreadedBasebandSampleSource* source); //!< Remove a baseband sample source that runs on its own thread
|
||||||
|
|
||||||
|
uint32_t getNumberOfSources() const { return m_basebandSampleSources.size() + m_threadedBasebandSampleSources.size(); }
|
||||||
|
|
||||||
void addSpectrumSink(BasebandSampleSink* spectrumSink); //!< Add a spectrum vis baseband sample sink
|
void addSpectrumSink(BasebandSampleSink* spectrumSink); //!< Add a spectrum vis baseband sample sink
|
||||||
void removeSpectrumSink(BasebandSampleSink* spectrumSink); //!< Add a spectrum vis baseband sample sink
|
void removeSpectrumSink(BasebandSampleSink* spectrumSink); //!< Add a spectrum vis baseband sample sink
|
||||||
|
|
||||||
|
@ -829,6 +829,12 @@ void MainWindow::on_channel_addClicked(bool checked)
|
|||||||
}
|
}
|
||||||
else if (deviceUI->m_deviceSinkEngine) // sink device => Tx channels
|
else if (deviceUI->m_deviceSinkEngine) // sink device => Tx channels
|
||||||
{
|
{
|
||||||
|
uint32_t nbSources = deviceUI->m_deviceSinkAPI->getNumberOfSources();
|
||||||
|
|
||||||
|
if (nbSources > 0) {
|
||||||
|
QMessageBox::information(this, tr("Message"), tr("%1 channel(s) already in use. Multiple transmission channels is experimental. You may experience performance problems").arg(nbSources));
|
||||||
|
}
|
||||||
|
|
||||||
m_pluginManager->createTxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI->m_deviceSinkAPI);
|
m_pluginManager->createTxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI->m_deviceSinkAPI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user