Fix unnecessary memory usage in radio

master
Ismael Gomez 6 years ago
parent 2cf381823c
commit 4a8d83721a

@ -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;

@ -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;

Loading…
Cancel
Save