rf_soapy: fix auto selection of Soapy device

when the default RF args are used, NULL is passed as argument
to the RF driver. In this case, we should use the previous
SoapySDRDevice_enumerate() and let Soapy pick the device
master
Andre Puschmann 4 years ago
parent 3994407f46
commit 5a31c5765b

@ -286,7 +286,10 @@ float rf_soapy_get_rssi(void* h)
int rf_soapy_open_multi(char* args, void** h, uint32_t num_requested_channels)
{
size_t length;
SoapySDRKwargs* soapy_args = SoapySDRDevice_enumerateStrArgs(args, &length);
// Let Soapy pick the device if no arguments are passed
SoapySDRKwargs* soapy_args =
args == NULL ? SoapySDRDevice_enumerate(NULL, &length) : SoapySDRDevice_enumerateStrArgs(args, &length);
if (length == 0) {
printf("No Soapy devices found.\n");

Loading…
Cancel
Save