summaryrefslogtreecommitdiff
path: root/src/components/ble/AlertNotificationClient.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-10-28 18:23:09 +0100
committerJF <jf@codingfield.com>2020-10-28 18:23:09 +0100
commitf90f2254f55086589d1d378d35a54085e2620cb6 (patch)
treed74081d6331b36ebdbe0138a45e2a96eca481968 /src/components/ble/AlertNotificationClient.cpp
parentcb9e8815d8bc6ce71fd8e97f3e3dae402658ce1f (diff)
Reset BLE services on disconnect, do not start advertising if a connection is already established.
Diffstat (limited to 'src/components/ble/AlertNotificationClient.cpp')
-rw-r--r--src/components/ble/AlertNotificationClient.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/ble/AlertNotificationClient.cpp b/src/components/ble/AlertNotificationClient.cpp
index 40970e0b..29bc2f73 100644
--- a/src/components/ble/AlertNotificationClient.cpp
+++ b/src/components/ble/AlertNotificationClient.cpp
@@ -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;
+}