mirror of https://github.com/PentHertz/srsLTE.git
Set TA to time_adv instead of nsamples
This commit is contained in:
parent
65023f576e
commit
056e379347
|
@ -186,14 +186,9 @@ void phch_recv::set_agc_enable(bool enable)
|
|||
}
|
||||
}
|
||||
|
||||
void phch_recv::set_time_adv_sec(float _time_adv_sec)
|
||||
void phch_recv::set_time_adv_sec(float time_adv_sec)
|
||||
{
|
||||
if (TX_MODE_CONTINUOUS && !radio_h->is_first_of_burst()) {
|
||||
int nsamples = ceil(current_srate*_time_adv_sec);
|
||||
next_offset = -nsamples;
|
||||
} else {
|
||||
time_adv_sec = _time_adv_sec;
|
||||
}
|
||||
this->time_adv_sec = time_adv_sec;
|
||||
}
|
||||
|
||||
void phch_recv::set_ue_sync_opts(srslte_ue_sync_t *q, float cfo)
|
||||
|
|
|
@ -226,7 +226,7 @@ void phy::set_timeadv_rar(uint32_t ta_cmd) {
|
|||
|
||||
void phy::set_timeadv(uint32_t ta_cmd) {
|
||||
uint32_t new_nta = srslte_N_ta_new(n_ta, ta_cmd);
|
||||
sf_recv.set_time_adv_sec(((float) (new_nta - n_ta))*SRSLTE_LTE_TS);
|
||||
sf_recv.set_time_adv_sec(((float) new_nta)*SRSLTE_LTE_TS);
|
||||
Info("PHY: Set TA: ta_cmd: %d, n_ta: %d, old_n_ta: %d, ta_usec: %.1f\n", ta_cmd, new_nta, n_ta, ((float) new_nta)*SRSLTE_LTE_TS*1e6);
|
||||
n_ta = new_nta;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue