fix bug in tti interval calculation now returning 0 when called with the same value

This commit is contained in:
Andre Puschmann 2017-10-18 15:00:47 +02:00
parent 29b9b6001b
commit ab11a80c6f
1 changed files with 1 additions and 1 deletions

View File

@ -605,7 +605,7 @@ int srslte_band_get_fd_region(enum band_geographical_area region, srslte_earfcn_
/* Returns the interval tti1-tti2 mod 10240 */
uint32_t srslte_tti_interval(uint32_t tti1, uint32_t tti2) {
if (tti1 > tti2) {
if (tti1 >= tti2) {
return tti1-tti2;
} else {
return 10240-tti2+tti1;