From ab11a80c6f0c331f415df4a86cc68d8ba4b72e08 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 18 Oct 2017 15:00:47 +0200 Subject: [PATCH] fix bug in tti interval calculation now returning 0 when called with the same value --- lib/src/phy/common/phy_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/phy/common/phy_common.c b/lib/src/phy/common/phy_common.c index b502fbd75..b4f5e122b 100644 --- a/lib/src/phy/common/phy_common.c +++ b/lib/src/phy/common/phy_common.c @@ -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;