add bleconnection connected()
This commit is contained in:
5 files changed
+15
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user