From 4a8d83721a91a118ae85edb334e7479bc1fb3296 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 20 Sep 2018 09:45:46 +0200 Subject: [PATCH] Fix unnecessary memory usage in radio --- lib/include/srslte/radio/radio.h | 2 +- lib/src/radio/radio.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/radio/radio.h b/lib/include/srslte/radio/radio.h index 658bf7367..1568d32cc 100644 --- a/lib/include/srslte/radio/radio.h +++ b/lib/include/srslte/radio/radio.h @@ -140,7 +140,7 @@ class radio { srslte_rf_t rf_device; - const static uint32_t burst_preamble_max_samples = 30720000; // 30.72 MHz is maximum frequency + const static uint32_t burst_preamble_max_samples = 4096; double burst_preamble_sec;// Start of burst preamble time (off->on RF transition time) srslte_timestamp_t end_of_burst_time; bool is_start_of_burst; diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index 9eb7073ef..aa30afe0f 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -359,7 +359,7 @@ void radio::set_tx_srate(double srate) burst_preamble_samples = (uint32_t) (cur_tx_srate * burst_preamble_sec); if (burst_preamble_samples > burst_preamble_max_samples) { burst_preamble_samples = burst_preamble_max_samples; - fprintf(stderr, "Error setting TX srate %.1f MHz. Maximum frequency for zero prepadding is 30.72 MHz\n", srate*1e-6); + fprintf(stderr, "Error setting TX srate %.1f MHz. Maximum burst preamble samples: %d, requested: %d\n", srate*1e-6, burst_preamble_max_samples, burst_preamble_samples ); } burst_preamble_time_rounded = (double) burst_preamble_samples/cur_tx_srate;