From c9ced0b2e1473e448b4f409339d2af373b470957 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 13 Jul 2017 13:44:09 +0100 Subject: [PATCH] fixing commits --- lib/src/phy/rf/rf_soapy_imp.c | 55 ----------------------------------- 1 file changed, 55 deletions(-) diff --git a/lib/src/phy/rf/rf_soapy_imp.c b/lib/src/phy/rf/rf_soapy_imp.c index 40fc37441..760b9b880 100644 --- a/lib/src/phy/rf/rf_soapy_imp.c +++ b/lib/src/phy/rf/rf_soapy_imp.c @@ -126,24 +126,12 @@ int rf_soapy_start_rx_stream(void *h) int rf_soapy_start_tx_stream(void *h) { -<<<<<<< HEAD rf_soapy_handler_t *handler = (rf_soapy_handler_t*) h; if(SoapySDRDevice_activateStream(handler->device, handler->txStream, 0, 0, 0) != 0) return SRSLTE_ERROR; handler->tx_stream_active = true; -======= - rf_soapy_handler_t *handler = (rf_soapy_handler_t*) h; - if (SoapySDRDevice_setupStream(handler->device, &(handler->txStream), SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) { - printf("setupStream fail: %s\n", SoapySDRDevice_lastError()); - return SRSLTE_ERROR; - } - - if(SoapySDRDevice_activateStream(handler->device, handler->txStream, 0, 0, 0) != 0) - return SRSLTE_ERROR; - ->>>>>>> 266f1b08fbf508cda5f1d2db3451776fd14c56cb return SRSLTE_SUCCESS; } @@ -225,27 +213,16 @@ int rf_soapy_open_multi(char *args, void **h, uint32_t nof_rx_antennas) bzero(handler, sizeof(rf_soapy_handler_t)); *h = handler; handler->device = sdr; -<<<<<<< HEAD handler->tx_stream_active = false; if (SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) { printf("setupStream fail: %s\n", SoapySDRDevice_lastError()); return SRSLTE_ERROR; } - if (SoapySDRDevice_setupStream(handler->device, &(handler->txStream), SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) { -======= - - if (SoapySDRDevice_setupStream(handler->device, &(handler->rxStream), SOAPY_SDR_RX, SOAPY_SDR_CF32, NULL, 0, NULL) != 0) { ->>>>>>> 266f1b08fbf508cda5f1d2db3451776fd14c56cb printf("setupStream fail: %s\n", SoapySDRDevice_lastError()); return SRSLTE_ERROR; } - -<<<<<<< HEAD - -======= ->>>>>>> 266f1b08fbf508cda5f1d2db3451776fd14c56cb return SRSLTE_SUCCESS; } @@ -330,11 +307,7 @@ double rf_soapy_set_tx_gain(void *h, double gain) printf("setGain fail: %s\n", SoapySDRDevice_lastError()); return SRSLTE_ERROR; } -<<<<<<< HEAD return rf_soapy_get_tx_gain(h); -======= - return rf_soapy_get_rx_gain(h); ->>>>>>> 266f1b08fbf508cda5f1d2db3451776fd14c56cb } @@ -372,11 +345,7 @@ double rf_soapy_set_tx_freq(void *h, double freq) printf("setFrequency fail: %s\n", SoapySDRDevice_lastError()); return SRSLTE_ERROR; } -<<<<<<< HEAD return SoapySDRDevice_getFrequency(handler->device, SOAPY_SDR_TX, 0); -======= - return SoapySDRDevice_getFrequency(handler->device, SOAPY_SDR_RX, 0); ->>>>>>> 266f1b08fbf508cda5f1d2db3451776fd14c56cb } @@ -448,7 +417,6 @@ int rf_soapy_recv_with_time(void *h, { return rf_soapy_recv_with_time_multi(h, &data, nsamples, blocking, secs, frac_secs); } -<<<<<<< HEAD int rf_soapy_send_timed(void *h, @@ -500,28 +468,5 @@ int rf_soapy_send_timed(void *h, return ret; -======= ->>>>>>> 266f1b08fbf508cda5f1d2db3451776fd14c56cb - -int rf_soapy_send_timed(void *h, - void *data, - int nsamples, - time_t secs, - double frac_secs, - bool has_time_spec, - bool blocking, - bool is_start_of_burst, - bool is_end_of_burst) -{ - int flags; - long long timeNs; - rf_soapy_handler_t *handler = (rf_soapy_handler_t*) h; - timeNs = secs * 1000000000; - timeNs = timeNs + (frac_secs * 1000000000); - int ret = SoapySDRDevice_writeStream(handler->device, handler->txStream, data, nsamples, &flags, timeNs, 100000); - if(ret != nsamples) - return SRSLTE_ERROR; - - return ret; }