Skip to content

Commit

Permalink
Merge pull request #1010 from vrahane/nimble_scanning_fix
Browse files Browse the repository at this point in the history
controller/ble_ll_scan: For callouts number of ticks should be used
  • Loading branch information
vrahane committed Aug 11, 2021
2 parents 14acdf1 + a472cf5 commit e49a145
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nimble/controller/src/ble_ll_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3431,20 +3431,16 @@ ble_ll_set_ext_scan_params(const uint8_t *cmdbuf, uint8_t len)
static void
ble_ll_scan_duration_period_timers_restart(struct ble_ll_scan_sm *scansm)
{
ble_npl_time_t now;

now = ble_npl_time_get();

ble_npl_callout_stop(&scansm->duration_timer);
ble_npl_callout_stop(&scansm->period_timer);

if (scansm->duration_ticks) {
ble_npl_callout_reset(&scansm->duration_timer,
now + scansm->duration_ticks);
scansm->duration_ticks);

if (scansm->period_ticks) {
ble_npl_callout_reset(&scansm->period_timer,
now + scansm->period_ticks);
scansm->period_ticks);
}
}
}
Expand Down

0 comments on commit e49a145

Please sign in to comment.