From dbec7a3e94ebc2711ac5dacac72a6033dd585158 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Mon, 6 Jul 2020 15:40:52 +0200 Subject: [PATCH] sys/shell/sc_nimble_netif: cleanup timing params --- sys/shell/commands/sc_nimble_netif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/shell/commands/sc_nimble_netif.c b/sys/shell/commands/sc_nimble_netif.c index 3d2323c4e0..774ad4fb74 100644 --- a/sys/shell/commands/sc_nimble_netif.c +++ b/sys/shell/commands/sc_nimble_netif.c @@ -343,8 +343,8 @@ static void _cmd_close(int handle) static void _cmd_update(int handle, int itvl, int timeout) { struct ble_gap_upd_params params; - params.itvl_min = (uint16_t)((itvl * 1000) / BLE_HCI_CONN_ITVL); - params.itvl_max = (uint16_t)((itvl * 1000) / BLE_HCI_CONN_ITVL); + params.itvl_min = (uint16_t)BLE_GAP_CONN_ITVL_MS(itvl); + params.itvl_max = (uint16_t)BLE_GAP_CONN_ITVL_MS(itvl); params.latency = 0; params.supervision_timeout = (uint16_t)(timeout / 10); params.min_ce_len = BLE_GAP_INITIAL_CONN_MIN_CE_LEN;