mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -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:
parent
ba4b2bd83b
commit
a2a9c45210
@ -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>
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -51,10 +51,20 @@ PluginInterface::SampleSourceDevices FCDProPlugin::enumSampleSources()
|
||||
{
|
||||
SampleSourceDevices result;
|
||||
|
||||
QString displayedName(QString("Funcube Dongle Pro #1"));
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32(1, 0);
|
||||
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.fcdpro", s.final()));
|
||||
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;
|
||||
}
|
||||
|
@ -51,10 +51,20 @@ PluginInterface::SampleSourceDevices FCDProPlusPlugin::enumSampleSources()
|
||||
{
|
||||
SampleSourceDevices result;
|
||||
|
||||
QString displayedName(QString("FunCube Pro+ #1"));
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32(1, 0);
|
||||
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.fcdproplus", s.final()));
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user