You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2019/07/12 13:46:45 UTC

[mynewt-nimble] 08/12: nimble/ll: Fix start time calculations

This is an automated email from the ASF dual-hosted git repository.

rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit cb1137d295780b525e6787237de73614ca2db9a8
Author: Ɓukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Wed Jul 10 13:49:17 2019 +0200

    nimble/ll: Fix start time calculations
---
 nimble/controller/src/ble_ll_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nimble/controller/src/ble_ll_sched.c b/nimble/controller/src/ble_ll_sched.c
index e69affd..4dd187a 100644
--- a/nimble/controller/src/ble_ll_sched.c
+++ b/nimble/controller/src/ble_ll_sched.c
@@ -1705,9 +1705,9 @@ ble_ll_sched_aux_scan(struct ble_mbuf_hdr *ble_hdr,
 
     start_time = ble_hdr->beg_cputime + off_ticks;
     start_time_rem_usecs = ble_hdr->rem_usecs + off_rem_usecs;
-    if (start_time_rem_usecs > 30) {
+    if (start_time_rem_usecs >= 31) {
         start_time++;
-        start_time_rem_usecs -= 30;
+        start_time_rem_usecs -= 31;
     }
     start_time -= g_ble_ll_sched_offset_ticks;