fix formating

This commit is contained in:
Andre Puschmann 2017-10-04 16:17:44 +02:00
parent b353ed03dd
commit 81b143715b
1 changed files with 42 additions and 47 deletions

View File

@ -88,12 +88,12 @@ void rf_soapy_register_error_handler(void *notused, srslte_rf_error_handler_t ne
} }
char* rf_soapy_devname(void* h) char* rf_soapy_devname(void* h)
{ {
return "soapy"; return "soapy";
} }
bool rf_soapy_rx_wait_lo_locked(void *h) bool rf_soapy_rx_wait_lo_locked(void *h)
{ {
printf("TODO: implement rf_soapy_rx_wait_lo_locked()\n"); printf("TODO: implement rf_soapy_rx_wait_lo_locked()\n");
@ -155,7 +155,6 @@ int rf_soapy_stop_tx_stream(void *h)
if(SoapySDRDevice_deactivateStream(handler->device, handler->txStream, 0, 0) != 0) if(SoapySDRDevice_deactivateStream(handler->device, handler->txStream, 0, 0) != 0)
return SRSLTE_ERROR; return SRSLTE_ERROR;
handler->tx_stream_active = false; handler->tx_stream_active = false;
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }
@ -199,9 +198,8 @@ int rf_soapy_open_multi(char *args, void **h, uint32_t nof_rx_antennas)
} }
for (size_t i = 0; i < length; i++) { for (size_t i = 0; i < length; i++) {
printf("Soapy Has Found device #%d: ", (int)i); printf("Soapy has Found device #%d: ", (int)i);
for (size_t j = 0; j < soapy_args[i].size; j++) for (size_t j = 0; j < soapy_args[i].size; j++) {
{
printf("%s=%s, ", soapy_args[i].keys[j], soapy_args[i].vals[j]); printf("%s=%s, ", soapy_args[i].keys[j], soapy_args[i].vals[j]);
} }
printf("\n"); printf("\n");
@ -221,7 +219,6 @@ int rf_soapy_open_multi(char *args, void **h, uint32_t nof_rx_antennas)
handler->tx_stream_active = false; handler->tx_stream_active = false;
handler->rx_stream_active = false; handler->rx_stream_active = false;
if(SoapySDRDevice_getNumChannels(handler->device,SOAPY_SDR_RX) > 0){ if(SoapySDRDevice_getNumChannels(handler->device,SOAPY_SDR_RX) > 0){
printf("setting up RX stream\n"); printf("setting up RX stream\n");
if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) { if(SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) {
@ -364,7 +361,8 @@ double rf_soapy_set_tx_freq(void *h, double freq)
} }
void rf_soapy_get_time(void *h, time_t *secs, double *frac_secs) { void rf_soapy_get_time(void *h, time_t *secs, double *frac_secs)
{
} }
@ -439,7 +437,6 @@ int rf_soapy_send_timed(void *h,
bool is_start_of_burst, bool is_start_of_burst,
bool is_end_of_burst) bool is_end_of_burst)
{ {
int flags; int flags;
long long timeNs; long long timeNs;
int trials = 0; int trials = 0;
@ -453,7 +450,6 @@ int rf_soapy_send_timed(void *h,
rf_soapy_start_tx_stream(h); rf_soapy_start_tx_stream(h);
} }
cf_t *data_c = (cf_t *) data; cf_t *data_c = (cf_t *) data;
do { do {
size_t tx_samples = nsamples; size_t tx_samples = nsamples;
@ -474,5 +470,4 @@ int rf_soapy_send_timed(void *h,
return SRSLTE_ERROR; return SRSLTE_ERROR;
return ret; return ret;
} }