add ServiceDiscovery::isActive()
This commit is contained in:
parent
c058b2b4ec
commit
9a1cb12120
2 changed files with 10 additions and 0 deletions
|
@ -61,6 +61,12 @@ ServiceDiscovery::terminate(void)
|
|||
sdSingleton.terminateServiceDiscovery();
|
||||
}
|
||||
|
||||
bool
|
||||
ServiceDiscovery::isActive(void)
|
||||
{
|
||||
return sdSingleton.isActive();
|
||||
}
|
||||
|
||||
ble_error_t
|
||||
NordicServiceDiscovery::launchCharacteristicDiscovery(Gap::Handle_t connectionHandle,
|
||||
Gap::Handle_t startHandle,
|
||||
|
|
|
@ -49,6 +49,10 @@ public:
|
|||
serviceIndex++; /* Progress service index to keep discovery alive. */
|
||||
}
|
||||
|
||||
bool isActive(void) const {
|
||||
return (sDiscoveryActive || cDiscoveryActive);
|
||||
}
|
||||
|
||||
private:
|
||||
void resetDiscoveredServices(void) {
|
||||
numServices = 0;
|
||||
|
|
Loading…
Reference in a new issue