mirror of https://github.com/PentHertz/srsLTE.git
Over the wire format can be selected through RF args
This commit is contained in:
parent
336a6b6217
commit
55446fc2a2
|
@ -386,6 +386,16 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels)
|
||||||
uhd_usrp_set_clock_source(handler->usrp, "gpsdo", 0);
|
uhd_usrp_set_clock_source(handler->usrp, "gpsdo", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set over the wire format
|
||||||
|
char *otw_format = "sc16";
|
||||||
|
if (strstr(args, "otw_format=sc12")) {
|
||||||
|
otw_format = "sc12";
|
||||||
|
} else if (strstr(args, "otw_format=sc16")) {
|
||||||
|
/* Do nothing */
|
||||||
|
} else if (strstr(args, "otw_format=")) {
|
||||||
|
fprintf(stderr, "Wrong over the wire format. Valid formats: sc12, sc16\n", error);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
handler->has_rssi = get_has_rssi(handler);
|
handler->has_rssi = get_has_rssi(handler);
|
||||||
if (handler->has_rssi) {
|
if (handler->has_rssi) {
|
||||||
|
@ -395,7 +405,7 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels)
|
||||||
size_t channel[4] = {0, 1, 2, 3};
|
size_t channel[4] = {0, 1, 2, 3};
|
||||||
uhd_stream_args_t stream_args = {
|
uhd_stream_args_t stream_args = {
|
||||||
.cpu_format = "fc32",
|
.cpu_format = "fc32",
|
||||||
.otw_format = (nof_channels > 1) ? "sc12" : "sc16",
|
.otw_format = otw_format,
|
||||||
.args = "",
|
.args = "",
|
||||||
.channel_list = channel,
|
.channel_list = channel,
|
||||||
.n_channels = nof_channels,
|
.n_channels = nof_channels,
|
||||||
|
@ -632,7 +642,8 @@ int rf_uhd_recv_with_time_multi(void *h,
|
||||||
return -1;
|
return -1;
|
||||||
} else if (error_code != UHD_RX_METADATA_ERROR_CODE_NONE ) {
|
} else if (error_code != UHD_RX_METADATA_ERROR_CODE_NONE ) {
|
||||||
fprintf(stderr, "Error code 0x%x was returned during streaming. Aborting.\n", error_code);
|
fprintf(stderr, "Error code 0x%x was returned during streaming. Aborting.\n", error_code);
|
||||||
return -1;
|
// FIXME: Keep going if an error not mentioned above occurs
|
||||||
|
// return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (n < nsamples && trials < 100);
|
} while (n < nsamples && trials < 100);
|
||||||
|
|
Loading…
Reference in New Issue