1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 07:24:44 -04: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
@@ -43,8 +43,12 @@ BladerfOutput::BladerfOutput(DeviceSinkAPI *deviceAPI) :
BladerfOutput::~BladerfOutput()
{
stop();
m_deviceAPI->setBuddySharedPtr(0);
if (m_dev != 0)
{
stop();
}
m_deviceAPI->setBuddySharedPtr(0);
}
bool BladerfOutput::init(const Message& cmd)
@@ -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