From 2e53478a3b767ec2ce14a400596ee0e354d0a1d4 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 24 Sep 2018 11:26:30 +0200 Subject: [PATCH] Allow time_adv_nsamples parameter to be negative --- srsue/src/ue.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srsue/src/ue.cc b/srsue/src/ue.cc index 56e8b6c44..daccfca8b 100644 --- a/srsue/src/ue.cc +++ b/srsue/src/ue.cc @@ -181,8 +181,10 @@ bool ue::init(all_args_t *args_) { // Set RF options if (args->rf.time_adv_nsamples.compare("auto")) { - radio.set_tx_adv(atoi(args->rf.time_adv_nsamples.c_str())); - } + int t = atoi(args->rf.time_adv_nsamples.c_str()); + radio.set_tx_adv(abs(t)); + radio.set_tx_adv_neg(t<0); + } if (args->rf.burst_preamble.compare("auto")) { radio.set_burst_preamble(atof(args->rf.burst_preamble.c_str())); }