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:
parent
f1ac22576c
commit
cb207e26c7
@ -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
|
||||
|
@ -44,8 +44,12 @@ BladerfInput::BladerfInput(DeviceSourceAPI *deviceAPI) :
|
||||
|
||||
BladerfInput::~BladerfInput()
|
||||
{
|
||||
stop();
|
||||
m_deviceAPI->setBuddySharedPtr(0);
|
||||
if (m_dev != 0)
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
m_deviceAPI->setBuddySharedPtr(0);
|
||||
}
|
||||
|
||||
bool BladerfInput::init(const Message& cmd)
|
||||
@ -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)
|
||||
// {
|
||||
|
Loading…
Reference in New Issue
Block a user