1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00

BladeRF plugins: fixed start/stop and delete sequences

This commit is contained in:
f4exb 2017-01-03 09:09:51 +01:00
parent f1ac22576c
commit cb207e26c7
2 changed files with 14 additions and 8 deletions

View File

@ -42,8 +42,12 @@ BladerfOutput::BladerfOutput(DeviceSinkAPI *deviceAPI) :
}
BladerfOutput::~BladerfOutput()
{
if (m_dev != 0)
{
stop();
}
m_deviceAPI->setBuddySharedPtr(0);
}
@ -183,7 +187,6 @@ void BladerfOutput::stop()
if(m_dev != 0) // close BladeRF
{
bladerf_close(m_dev);
m_dev = 0;
}
}
}
@ -194,11 +197,11 @@ void BladerfOutput::stop()
if(m_dev != 0) // close BladeRF
{
bladerf_close(m_dev);
m_dev = 0;
}
}
m_sharedParams.m_dev = 0;
m_dev = 0;
}
const QString& BladerfOutput::getDeviceDescription() const

View File

@ -43,8 +43,12 @@ BladerfInput::BladerfInput(DeviceSourceAPI *deviceAPI) :
}
BladerfInput::~BladerfInput()
{
if (m_dev != 0)
{
stop();
}
m_deviceAPI->setBuddySharedPtr(0);
}
@ -197,7 +201,6 @@ void BladerfInput::stop()
if(m_dev != 0) // close BladeRF
{
bladerf_close(m_dev);
m_dev = 0;
}
}
}
@ -206,11 +209,11 @@ void BladerfInput::stop()
if(m_dev != 0) // close BladeRF
{
bladerf_close(m_dev);
m_dev = 0;
}
}
m_sharedParams.m_dev = 0;
m_dev = 0;
// if(m_dev != 0)
// {