Reset BLE services on disconnect, do not start advertising if a connection is already established.

This commit is contained in:
JF
2020-10-28 18:23:09 +01:00
parent cb9e8815d8
commit f90f2254f5
5 changed files with 54 additions and 23 deletions

View File

@@ -139,3 +139,16 @@ uint16_t AlertNotificationClient::EndHandle() const {
uint16_t AlertNotificationClient::NewAlerthandle() const {
return newAlertHandle;
}
void AlertNotificationClient::Reset() {
ansStartHandle = 0;
ansEndHandle = 0;
supportedNewAlertCategoryHandle = 0;
supportedUnreadAlertCategoryHandle = 0;
newAlertHandle = 0;
newAlertDescriptorHandle = 0;
newAlertDefHandle = 0;
unreadAlertStatusHandle = 0;
controlPointHandle = 0;
isDiscovered = false;
}