1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-07-31 13:02:27 -04:00

LibbladeRF2: make bladeRF1 work

This commit is contained in:
f4exb 2018-09-18 23:12:00 +02:00
parent d2a740425b
commit d596931209
10 changed files with 25 additions and 15 deletions

View File

@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
*/ */
QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangel"); QCoreApplication::setApplicationName("SDRangel");
QCoreApplication::setApplicationVersion("4.1.0"); QCoreApplication::setApplicationVersion("4.2.0");
#if 1 #if 1
qApp->setStyle(QStyleFactory::create("fusion")); qApp->setStyle(QStyleFactory::create("fusion"));

View File

@ -57,7 +57,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelBench"); QCoreApplication::setApplicationName("SDRangelBench");
QCoreApplication::setApplicationVersion("4.1.0"); QCoreApplication::setApplicationVersion("4.2.0");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP}; int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int)); std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

View File

@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelSrv"); QCoreApplication::setApplicationName("SDRangelSrv");
QCoreApplication::setApplicationVersion("4.1.0"); QCoreApplication::setApplicationVersion("4.2.0");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP}; int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int)); std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
sdrangel (4.2.0-1) unstable; urgency=medium
* LibbladeRF 2.0 support with BladeRF Micro
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 14 Oct 2018 21:14:18 +0200
sdrangel (4.1.0-1) unstable; urgency=medium sdrangel (4.1.0-1) unstable; urgency=medium
* Integrated SDRdaemon with a pair of new channel plugins * Integrated SDRdaemon with a pair of new channel plugins

View File

@ -14,6 +14,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QtGlobal>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#include "devicebladerf.h" #include "devicebladerf.h"
@ -24,7 +26,7 @@ bool DeviceBladeRF::open_bladerf(struct bladerf **dev, const char *serial)
if ((*dev = open_bladerf_from_serial(serial)) == 0) if ((*dev = open_bladerf_from_serial(serial)) == 0)
{ {
fprintf(stderr, "DeviceBladeRF::open_bladerf: could not open BladeRF\n"); qCritical("DeviceBladeRF::open_bladerf: could not open BladeRF");
return false; return false;
} }
@ -32,13 +34,13 @@ bool DeviceBladeRF::open_bladerf(struct bladerf **dev, const char *serial)
if (fpga_loaded < 0) if (fpga_loaded < 0)
{ {
fprintf(stderr, "DeviceBladeRF::open_bladerf: failed to check FPGA state: %s\n", qCritical("DeviceBladeRF::open_bladerf: failed to check FPGA state: %s",
bladerf_strerror(fpga_loaded)); bladerf_strerror(fpga_loaded));
return false; return false;
} }
else if (fpga_loaded == 0) else if (fpga_loaded == 0)
{ {
fprintf(stderr, "BladerfOutput::start: the device's FPGA is not loaded.\n"); qCritical("BladerfOutput::start: the device's FPGA is not loaded.");
return false; return false;
} }
@ -69,12 +71,12 @@ struct bladerf *DeviceBladeRF::open_bladerf_from_serial(const char *serial)
if (status == BLADERF_ERR_NODEV) if (status == BLADERF_ERR_NODEV)
{ {
fprintf(stderr, "DeviceBladeRF::open_bladerf_from_serial: No devices available with serial=%s\n", serial); qCritical("DeviceBladeRF::open_bladerf_from_serial: No devices available with serial %s", serial);
return 0; return 0;
} }
else if (status != 0) else if (status != 0)
{ {
fprintf(stderr, "DeviceBladeRF::open_bladerf_from_serial: Failed to open device with serial=%s (%s)\n", qCritical("DeviceBladeRF::open_bladerf_from_serial: Failed to open device with serial %s (%s)",
serial, bladerf_strerror(status)); serial, bladerf_strerror(status));
return 0; return 0;
} }

View File

@ -103,7 +103,7 @@ bool BladerfOutput::openDevice()
} }
// TODO: adjust USB transfer data according to sample rate // TODO: adjust USB transfer data according to sample rate
if ((res = bladerf_sync_config(m_dev, BLADERF_MODULE_TX, BLADERF_FORMAT_SC16_Q11, 64, 8192, 32, 10000)) < 0) if ((res = bladerf_sync_config(m_dev, BLADERF_TX_X1, BLADERF_FORMAT_SC16_Q11, 64, 8192, 32, 10000)) < 0)
{ {
qCritical("BladerfOutput::start: bladerf_sync_config with return code %d", res); qCritical("BladerfOutput::start: bladerf_sync_config with return code %d", res);
return false; return false;

View File

@ -30,7 +30,7 @@
const PluginDescriptor BladerfOutputPlugin::m_pluginDescriptor = { const PluginDescriptor BladerfOutputPlugin::m_pluginDescriptor = {
QString("BladeRF Output"), QString("BladeRF Output"),
QString("3.14.5"), QString("4.2.0"),
QString("(c) Edouard Griffiths, F4EXB"), QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,

View File

@ -112,7 +112,7 @@ bool BladerfInput::openDevice()
} }
// TODO: adjust USB transfer data according to sample rate // TODO: adjust USB transfer data according to sample rate
if ((res = bladerf_sync_config(m_dev, BLADERF_MODULE_RX, BLADERF_FORMAT_SC16_Q11, 64, 8192, 32, 10000)) < 0) if ((res = bladerf_sync_config(m_dev, BLADERF_RX_X1, BLADERF_FORMAT_SC16_Q11, 64, 8192, 32, 10000)) < 0)
{ {
qCritical("BladerfInput::start: bladerf_sync_config with return code %d", res); qCritical("BladerfInput::start: bladerf_sync_config with return code %d", res);
return false; return false;
@ -136,7 +136,9 @@ bool BladerfInput::start()
{ {
// QMutexLocker mutexLocker(&m_mutex); // QMutexLocker mutexLocker(&m_mutex);
if (!m_dev) { if (!m_dev)
{
qDebug("BladerfInput::start: no device handle");
return false; return false;
} }

View File

@ -30,7 +30,7 @@
const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = { const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = {
QString("BladeRF Input"), QString("BladeRF Input"),
QString("4.0.0"), QString("4.2.0"),
QString("(c) Edouard Griffiths, F4EXB"), QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,

View File

@ -362,7 +362,7 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoRunning()
if(!m_deviceSampleSink->start()) if(!m_deviceSampleSink->start())
{ {
return gotoError("DSPDeviceSinkEngine::gotoRunning: Could not start sample source"); return gotoError("DSPDeviceSinkEngine::gotoRunning: Could not start sample sink");
} }
for(BasebandSampleSources::const_iterator it = m_basebandSampleSources.begin(); it != m_basebandSampleSources.end(); it++) for(BasebandSampleSources::const_iterator it = m_basebandSampleSources.begin(); it != m_basebandSampleSources.end(); it++)