mirror of https://github.com/PentHertz/srsLTE.git
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
This commit is contained in:
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)
|
int rf_soapy_open_multi(char* args, void** h, uint32_t num_requested_channels)
|
||||||
{
|
{
|
||||||
size_t length;
|
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) {
|
if (length == 0) {
|
||||||
printf("No Soapy devices found.\n");
|
printf("No Soapy devices found.\n");
|
||||||
|
|
Loading…
Reference in New Issue