From 431fce998e70bf00e89552587ca04cbcc6f9583e Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 24 Apr 2018 18:45:55 +0200 Subject: [PATCH] Allow negative time_adv_nsamples parameter --- lib/src/radio/radio.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index d4cc2aa6c..3be26e6b3 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -451,6 +451,10 @@ void radio::set_tx_srate(double srate) // Calculate TX advance in seconds from samples and sampling rate tx_adv_sec = nsamples/cur_tx_srate; + if (tx_adv_sec<0) { + tx_adv_sec *= -1; + tx_adv_negative = true; + } } void radio::register_error_handler(srslte_rf_error_handler_t h)