pucch: added function to get last correlation

master
Ismael Gomez 8 years ago
parent b5554ce926
commit f0e0a71792

@ -101,6 +101,7 @@ typedef struct SRSLTE_API {
float threshold_format1; float threshold_format1;
float threshold_format1a; float threshold_format1a;
float last_corr;
}srslte_pucch_t; }srslte_pucch_t;
@ -125,6 +126,8 @@ SRSLTE_API uint32_t srslte_pucch_nof_symbols(srslte_pucch_cfg_t *cfg,
srslte_pucch_format_t format, srslte_pucch_format_t format,
bool shortened); bool shortened);
SRSLTE_API float srslte_pucch_get_last_corr(srslte_pucch_t* q);
SRSLTE_API int srslte_pucch_encode(srslte_pucch_t *q, SRSLTE_API int srslte_pucch_encode(srslte_pucch_t *q,
srslte_pucch_format_t format, srslte_pucch_format_t format,
uint32_t n_pucch, // n_pucch_1 or n_pucch_2 depending on format uint32_t n_pucch, // n_pucch_1 or n_pucch_2 depending on format

@ -671,6 +671,10 @@ int srslte_pucch_encode(srslte_pucch_t* q, srslte_pucch_format_t format,
return ret; return ret;
} }
float srslte_pucch_get_last_corr(srslte_pucch_t* q)
{
return q->last_corr;
}
/* Equalize, demodulate and decode PUCCH bits according to Section 5.4.1 of 36.211 */ /* Equalize, demodulate and decode PUCCH bits according to Section 5.4.1 of 36.211 */
int srslte_pucch_decode(srslte_pucch_t* q, srslte_pucch_format_t format, int srslte_pucch_decode(srslte_pucch_t* q, srslte_pucch_format_t format,
@ -752,6 +756,7 @@ int srslte_pucch_decode(srslte_pucch_t* q, srslte_pucch_format_t format,
ret = SRSLTE_ERROR; ret = SRSLTE_ERROR;
break; break;
} }
q->last_corr = corr;
} }
return ret; return ret;

Loading…
Cancel
Save