Skip to content

Commit

Permalink
Delete unsed logs and make avaliable more fast
Browse files Browse the repository at this point in the history
  • Loading branch information
sgbihu committed May 5, 2017
1 parent 66cc3a7 commit 69d5626
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion libraries/CurieBLE/src/internal/BLEDeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ BLEDevice BLEDeviceManager::available()
{
uint64_t timestamp_delta = timestamp - _peer_adv_mill[i];
temp = &_peer_adv_buffer[i];
if ((timestamp_delta >= 800) && // Wait scan response coming
if ((timestamp_delta >= 800 || _peer_scan_rsp_data_len[i] >= 0) && // Wait scan response coming
(timestamp_delta <= 2000) && // Check timeout
(max_delta < timestamp_delta))
{
Expand Down
9 changes: 0 additions & 9 deletions system/libarc32_arduino101/framework/src/services/ble/gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,27 +410,21 @@ static void check_pending_conn(const bt_addr_le_t *id_addr,
if (atomic_test_bit(bt_dev.flags, BT_DEV_EXPLICIT_SCAN)) {
return;
}
BT_DBG("%s %d", __FUNCTION__, __LINE__);

/* Return if event is not connectable */
if (evtype != BT_LE_ADV_IND && evtype != BT_LE_ADV_DIRECT_IND) {
return;
}

BT_DBG("%s %d", __FUNCTION__, __LINE__);

conn = bt_conn_lookup_state_le(id_addr, BT_CONN_CONNECT_SCAN);
if (!conn) {
return;
}
BT_DBG("%s %d", __FUNCTION__, __LINE__);

if (bt_hci_stop_scanning()) {
goto failed;
}

BT_DBG("%s %d", __FUNCTION__, __LINE__);

#if defined(CONFIG_BLUETOOTH_PRIVACY)
if (le_set_rpa()) {
return;
Expand All @@ -442,12 +436,9 @@ static void check_pending_conn(const bt_addr_le_t *id_addr,

bt_addr_le_copy(&conn->le.resp_addr, addr);

BT_DBG("%s %d", __FUNCTION__, __LINE__);

if (hci_le_create_conn(conn)) {
goto failed;
}
BT_DBG("%s %d", __FUNCTION__, __LINE__);

bt_conn_set_state(conn, BT_CONN_CONNECT);
bt_conn_unref(conn);
Expand Down
Binary file modified variants/arduino_101/libarc32drv_arduino101.a
Binary file not shown.

0 comments on commit 69d5626

Please sign in to comment.