You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/06/22 13:18:23 UTC
[mynewt-nimble] 03/12: nimble/ll/css: Fix conn event end time calculation
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 25c9e2ddac3bc7e933f1890d3d0e20c47ef719f5
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Jun 8 15:48:59 2022 +0200
nimble/ll/css: Fix conn event end time calculation
Proper end time is obviously slot duration from start time.
---
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 149fee90..6e1cde54 100644
--- a/nimble/controller/src/ble_ll_sched.c
+++ b/nimble/controller/src/ble_ll_sched.c
@@ -521,13 +521,13 @@ ble_ll_sched_conn_central_new(struct ble_ll_conn_sm *connsm,
ble_ll_sched_css_set_conn_anchor(connsm);
sch->start_time = connsm->anchor_point - g_ble_ll_sched_offset_ticks;
+ sch->end_time = connsm->anchor_point;
sch->remainder = connsm->anchor_point_usecs;
OS_EXIT_CRITICAL(sr);
- sch->end_time = sch->start_time;
rem_us = sch->remainder;
- ble_ll_tmr_add(&sch->end_time, &rem_us, ble_ll_sched_css_get_period_slots());
+ ble_ll_tmr_add(&sch->end_time, &rem_us, ble_ll_sched_css_get_slot_us());
if (rem_us == 0) {
sch->end_time--;
}