|
|
@ -358,24 +358,8 @@ void radio::set_tx_srate(double srate)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (!strcmp(srslte_rf_name(&rf_device), "uhd_x300")) {
|
|
|
|
} else if (!strcmp(srslte_rf_name(&rf_device), "uhd_x300")) {
|
|
|
|
|
|
|
|
|
|
|
|
double srate_khz = round(cur_tx_srate/1e3);
|
|
|
|
// In X300 TX/RX offset is independent of sampling rate
|
|
|
|
if (srate_khz == 1.92e3) {
|
|
|
|
nsamples = 45;
|
|
|
|
nsamples = 50;
|
|
|
|
|
|
|
|
} else if (srate_khz == 3.84e3) {
|
|
|
|
|
|
|
|
nsamples = 65;
|
|
|
|
|
|
|
|
} else if (srate_khz == 5.76e3) {
|
|
|
|
|
|
|
|
nsamples = 75;
|
|
|
|
|
|
|
|
} else if (srate_khz == 11.52e3) {
|
|
|
|
|
|
|
|
nsamples = 89;
|
|
|
|
|
|
|
|
} else if (srate_khz == 15.36e3) {
|
|
|
|
|
|
|
|
nsamples = 86;
|
|
|
|
|
|
|
|
} else if (srate_khz == 23.04e3) {
|
|
|
|
|
|
|
|
nsamples = 110;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
/* Interpolate from known values */
|
|
|
|
|
|
|
|
printf("\nWarning TX/RX time offset for sampling rate %.0f KHz not calibrated. Using interpolated value\n\n", cur_tx_srate);
|
|
|
|
|
|
|
|
nsamples = cur_tx_srate*(uhd_default_tx_adv_samples * (1/cur_tx_srate) + uhd_default_tx_adv_offset_sec);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (!strcmp(srslte_rf_name(&rf_device), "bladerf")) {
|
|
|
|
} else if (!strcmp(srslte_rf_name(&rf_device), "bladerf")) {
|
|
|
|
|
|
|
|
|
|
|
|
double srate_khz = round(cur_tx_srate/1e3);
|
|
|
|
double srate_khz = round(cur_tx_srate/1e3);
|
|
|
|