Fixed possible mod netgative SR period calculation

master
Ismael Gomez 7 years ago
parent 84c1a11d51
commit f17cfa3ac3

@ -626,13 +626,12 @@ int srslte_ue_ul_sr_send_tti(uint32_t I_sr, uint32_t current_tti) {
} else { } else {
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }
uint32_t sfn = current_tti/10; if (current_tti >= sr_N_offset) {
uint32_t subf = current_tti%10; if ((current_tti - sr_N_offset) % sr_periodicity == 0) {
if ((10*sfn+subf-sr_N_offset)%sr_periodicity==0) { return 1;
return 1; }
} else {
return SRSLTE_SUCCESS;
} }
return SRSLTE_SUCCESS;
} }

Loading…
Cancel
Save