Save last PHICH correlation

This commit is contained in:
Ismael Gomez 2017-12-20 13:47:49 +01:00
parent 821d5595c5
commit 33c35d575d
2 changed files with 4 additions and 1 deletions

View File

@ -126,7 +126,9 @@ typedef struct SRSLTE_API {
srslte_dci_msg_t pending_ul_dci_msg;
uint16_t pending_ul_dci_rnti;
float sample_offset;
float sample_offset;
float last_phich_corr;
}srslte_ue_dl_t;
/* This function shall be called just after the initial synchronization */

View File

@ -973,6 +973,7 @@ bool srslte_ue_dl_decode_phich(srslte_ue_dl_t *q, uint32_t sf_idx, uint32_t n_pr
srslte_phich_ngroups(&q->phich), srslte_phich_nsf(&q->phich));
if (!srslte_phich_decode(&q->phich, q->sf_symbols_m, q->ce_m, 0, ngroup, nseq, sf_idx, &ack_bit, &distance)) {
q->last_phich_corr = distance;
INFO("Decoded PHICH %d with distance %f\n", ack_bit, distance);
} else {
fprintf(stderr, "Error decoding PHICH\n");