void on_nble_gap_conn_update_evt(const struct nble_gap_conn_update_evt *evt) { struct bt_conn *conn; uint16_t handle, interval; handle = evt->conn_handle; interval = evt->conn_values.interval; /* BT_DBG("status %u, handle %u", evt->status, handle); */ conn = bt_conn_lookup_handle(handle); if (!conn) { /* BT_ERR("Unable to lookup conn for handle %u", handle); */ return; } /* if (!evt->status) { */ conn->le.interval = interval; conn->le.latency = evt->conn_values.latency; conn->le.timeout = evt->conn_values.supervision_to; notify_le_param_updated(conn); /* } */ bt_conn_unref(conn); }
void on_nble_gap_conn_update_evt(const struct nble_gap_conn_update_evt *ev) { struct bt_conn *conn; conn = bt_conn_lookup_handle(ev->conn_handle); if (!conn) { BT_ERR("Unable to find conn for handle %u", ev->conn_handle); return; } BT_DBG("conn %p handle %u interval %u latency %u to %u", conn, ev->conn_handle, ev->conn_values.interval, ev->conn_values.latency, ev->conn_values.supervision_to); conn->interval = ev->conn_values.interval; conn->latency = ev->conn_values.latency; conn->timeout = ev->conn_values.supervision_to; notify_le_param_updated(conn); bt_conn_unref(conn); }