kopia lustrzana https://github.com/f4exb/sdrangel
BladeRF plugins: fixed start/stop and delete sequences
rodzic
f1ac22576c
commit
cb207e26c7
|
@ -43,8 +43,12 @@ BladerfOutput::BladerfOutput(DeviceSinkAPI *deviceAPI) :
|
||||||
|
|
||||||
BladerfOutput::~BladerfOutput()
|
BladerfOutput::~BladerfOutput()
|
||||||
{
|
{
|
||||||
stop();
|
if (m_dev != 0)
|
||||||
m_deviceAPI->setBuddySharedPtr(0);
|
{
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_deviceAPI->setBuddySharedPtr(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BladerfOutput::init(const Message& cmd)
|
bool BladerfOutput::init(const Message& cmd)
|
||||||
|
@ -183,7 +187,6 @@ void BladerfOutput::stop()
|
||||||
if(m_dev != 0) // close BladeRF
|
if(m_dev != 0) // close BladeRF
|
||||||
{
|
{
|
||||||
bladerf_close(m_dev);
|
bladerf_close(m_dev);
|
||||||
m_dev = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,11 +197,11 @@ void BladerfOutput::stop()
|
||||||
if(m_dev != 0) // close BladeRF
|
if(m_dev != 0) // close BladeRF
|
||||||
{
|
{
|
||||||
bladerf_close(m_dev);
|
bladerf_close(m_dev);
|
||||||
m_dev = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sharedParams.m_dev = 0;
|
m_sharedParams.m_dev = 0;
|
||||||
|
m_dev = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString& BladerfOutput::getDeviceDescription() const
|
const QString& BladerfOutput::getDeviceDescription() const
|
||||||
|
|
|
@ -44,8 +44,12 @@ BladerfInput::BladerfInput(DeviceSourceAPI *deviceAPI) :
|
||||||
|
|
||||||
BladerfInput::~BladerfInput()
|
BladerfInput::~BladerfInput()
|
||||||
{
|
{
|
||||||
stop();
|
if (m_dev != 0)
|
||||||
m_deviceAPI->setBuddySharedPtr(0);
|
{
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_deviceAPI->setBuddySharedPtr(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BladerfInput::init(const Message& cmd)
|
bool BladerfInput::init(const Message& cmd)
|
||||||
|
@ -197,7 +201,6 @@ void BladerfInput::stop()
|
||||||
if(m_dev != 0) // close BladeRF
|
if(m_dev != 0) // close BladeRF
|
||||||
{
|
{
|
||||||
bladerf_close(m_dev);
|
bladerf_close(m_dev);
|
||||||
m_dev = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,11 +209,11 @@ void BladerfInput::stop()
|
||||||
if(m_dev != 0) // close BladeRF
|
if(m_dev != 0) // close BladeRF
|
||||||
{
|
{
|
||||||
bladerf_close(m_dev);
|
bladerf_close(m_dev);
|
||||||
m_dev = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sharedParams.m_dev = 0;
|
m_sharedParams.m_dev = 0;
|
||||||
|
m_dev = 0;
|
||||||
|
|
||||||
// if(m_dev != 0)
|
// if(m_dev != 0)
|
||||||
// {
|
// {
|
||||||
|
|
Ładowanie…
Reference in New Issue