mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-02 13:17:48 -04:00
HackRF plugin: initialize hackrf library before trying to enumerate
This commit is contained in:
parent
c483bb815d
commit
1ba3324844
@ -54,22 +54,18 @@ void HackRFPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
|
||||
PluginInterface::SampleSourceDevices HackRFPlugin::enumSampleSources()
|
||||
{
|
||||
SampleSourceDevices result;
|
||||
hackrf_device_list_t *hackrf_devices = hackrf_device_list();
|
||||
hackrf_device *hackrf_ptr;
|
||||
read_partid_serialno_t read_partid_serialno;
|
||||
hackrf_error rc;
|
||||
int i;
|
||||
|
||||
rc = (hackrf_error) hackrf_init();
|
||||
hackrf_error rc = (hackrf_error) hackrf_init();
|
||||
|
||||
if (rc != HACKRF_SUCCESS)
|
||||
{
|
||||
qCritical("HackRFPlugin::SampleSourceDevices: failed to initiate HackRF library: %s", hackrf_error_name(rc));
|
||||
}
|
||||
|
||||
|
||||
|
||||
SampleSourceDevices result;
|
||||
hackrf_device_list_t *hackrf_devices = hackrf_device_list();
|
||||
hackrf_device *hackrf_ptr;
|
||||
read_partid_serialno_t read_partid_serialno;
|
||||
int i;
|
||||
|
||||
for (i=0; i < hackrf_devices->devicecount; i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user