1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 03:09:14 -05:00

HackRF plugins: correct start/stop sequences

This commit is contained in:
f4exb 2017-01-11 01:21:22 +01:00
parent d1696365d7
commit 201695bb67
4 changed files with 12 additions and 12 deletions

View File

@ -30,7 +30,7 @@ From version 2 SDRangel can integrate more than one hardware device running conc
From version 3 transmission or signal generation is supported for BladeRF and HackRF (since version 3.1) using a sample sink plugin. These plugins are:
- [BladeRF output plugin](https://github.com/f4exb/sdrangel/tree/dev/plugins/samplesink/bladerfoutput)
- [BladeRF output plugin](https://github.com/f4exb/sdrangel/tree/dev/plugins/samplesink/bladerfoutput) limited support in Windows
- [HackRF output plugin](https://github.com/f4exb/sdrangel/tree/dev/plugins/samplesink/hackrfoutput)
- [File output or file sink plugin](https://github.com/f4exb/sdrangel/tree/dev/plugins/samplesink/filesink)

View File

@ -4,6 +4,8 @@
This output sample sink plugin sends its samples to a [BladeRF device](https://www.nuand.com/).
Warning to Windows users: concurrent use of Rx and Tx does not work correctly hence full duplex is not fully operational. For best results use BladeRF as a half duplex device like HackRF i.e. do not run Tx and Rx concurrently.
<h2>Build</h2>
The plugin will be built only if the [BladeRF host library](https://github.com/Nuand/bladeRF) is installed in your system. If you build it from source and install it in a custom location say: `/opt/install/libbladeRF` you will have to add `-DLIBBLADERF_INCLUDE_DIR=/opt/install/libbladeRF/include -DLIBBLADERF_LIBRARIES=/opt/install/libbladeRF/lib/libbladeRF.so` to the cmake command line.

View File

@ -67,11 +67,11 @@ void HackRFOutputThread::run()
{
hackrf_error rc;
rc = (hackrf_error) hackrf_start_tx(m_dev, tx_callback, this);
m_running = true;
m_startWaiter.wakeAll();
rc = (hackrf_error) hackrf_start_tx(m_dev, tx_callback, this);
if (rc != HACKRF_SUCCESS)
{
qCritical("HackRFOutputThread::run: failed to start HackRF Tx: %s", hackrf_error_name(rc));

View File

@ -41,13 +41,11 @@ HackRFInputThread::~HackRFInputThread()
void HackRFInputThread::startWork()
{
//m_startWaitMutex.lock();
m_running = true;
m_startWaitMutex.lock();
start();
/*
while(!m_running)
m_startWaiter.wait(&m_startWaitMutex, 100);
m_startWaitMutex.unlock();*/
m_startWaitMutex.unlock();
}
void HackRFInputThread::stopWork()
@ -76,11 +74,11 @@ void HackRFInputThread::run()
{
hackrf_error rc;
//m_running = true;
m_startWaiter.wakeAll();
rc = (hackrf_error) hackrf_start_rx(m_dev, rx_callback, this);
m_running = true;
m_startWaiter.wakeAll();
if (rc != HACKRF_SUCCESS)
{
qCritical("HackRFThread::run: failed to start HackRF Rx: %s", hackrf_error_name(rc));
@ -104,7 +102,7 @@ void HackRFInputThread::run()
qDebug("HackRFThread::run: failed to stop HackRF Rx: %s", hackrf_error_name(rc));
}
//m_running = false;
m_running = false;
}
// Decimate according to specified log2 (ex: log2=4 => decim=16)