nimble/ll/dtm: Minor remainder calculation fix

This commit is contained in:
Szymon Janc
2019-03-08 00:13:18 +01:00
parent cad1a2e4dc
commit 483b3b9624
2 changed files with 2 additions and 3 deletions
-1
View File
@@ -2311,7 +2311,6 @@ pri_phy_valid(uint8_t phy)
default:
return false;
}
}
static bool
+2 -2
View File
@@ -147,9 +147,9 @@ ble_ll_dtm_set_next(struct dtm_ctx *ctx)
sch->start_time += ctx->itvl_ticks;
sch->remainder += ctx->itvl_rem_usec;
if (sch->remainder > 30) {
if (sch->remainder >= 31) {
sch->start_time++;
sch->remainder -= 30;
sch->remainder -= 31;
}
sch->start_time -= g_ble_ll_sched_offset_ticks;