add bleconnection connected()

This commit is contained in:
hathach committed 2019-01-21 18:16:05 +07:00
1 parent 49ad36cdd6
commit 14980fbe12
5 files changed
+15 -3

No files matched your search

+1 -1
View File
@@ -110,7 +110,7 @@ bool BLECentral::connected(void)
BLEConnection* conn = Bluefruit.Gap.getConnection(c);
// skip Peripheral Role handle
if ( conn && (conn->getRole() == BLE_GAP_ROLE_CENTRAL) )
if ( conn && conn->connected() && (conn->getRole() == BLE_GAP_ROLE_CENTRAL) )
{
return true;
}