1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 12:51:49 -05:00

Deep redesign: Better support for FCD dongles #7: Activate original Pro plugin with proper enumeration of Pro or Pro+ matching devices

This commit is contained in:
f4exb 2015-09-04 05:02:45 +02:00
parent ba4b2bd83b
commit a2a9c45210
4 changed files with 29 additions and 10 deletions

View File

@ -19,7 +19,6 @@ These plugins come from the parent code base and are still present in the source
- tetra
- Sample sources:
- fcd
- fcdpro
- gnuradio
- osmosdr
- v4l-msi
@ -28,7 +27,6 @@ These plugins come from the parent code base and are still present in the source
<h3>Funcube Dongle (fcd, fcdpro)</h3>
- fcd is the old driver and will be completely removed in the future.
- fcdpro is the plugin for the original FunCube Dongle Pro (not Pro+). It is temporarily removed from the build to avoid confusion until the enumeration of devices works properly.
<h3>Gnuradio</h3>

View File

@ -18,6 +18,7 @@ if(LIBUSB_FOUND AND UNIX)
FIND_LIBRARY (LIBASOUND asound)
endif()
if(LIBASOUND AND ASOUNDH)
add_subdirectory(fcdpro)
add_subdirectory(fcdproplus)
endif()

View File

@ -51,11 +51,21 @@ PluginInterface::SampleSourceDevices FCDProPlugin::enumSampleSources()
{
SampleSourceDevices result;
QString displayedName(QString("Funcube Dongle Pro #1"));
int i = 1;
struct hid_device_info *device_info = hid_enumerate(0x04D8, 0xFB56);
while (device_info != 0)
{
QString serialNumber = QString::fromWCharArray(device_info->serial_number);
QString displayedName(QString("FunCube Dongle Pro #%1 ").arg(i) + serialNumber);
SimpleSerializer s(1);
s.writeS32(1, 0);
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.fcdpro", s.final()));
device_info = device_info->next;
i++;
}
return result;
}

View File

@ -51,11 +51,21 @@ PluginInterface::SampleSourceDevices FCDProPlusPlugin::enumSampleSources()
{
SampleSourceDevices result;
QString displayedName(QString("FunCube Pro+ #1"));
int i = 1;
struct hid_device_info *device_info = hid_enumerate(0x04D8, 0xFB31);
while (device_info != 0)
{
QString serialNumber = QString::fromWCharArray(device_info->serial_number);
QString displayedName(QString("FunCube Dongle Pro+ #%1 ").arg(i) + serialNumber);
SimpleSerializer s(1);
s.writeS32(1, 0);
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.fcdproplus", s.final()));
device_info = device_info->next;
i++;
}
return result;
}