From f90f2254f55086589d1d378d35a54085e2620cb6 Mon Sep 17 00:00:00 2001 From: JF Date: Wed, 28 Oct 2020 18:23:09 +0100 Subject: Reset BLE services on disconnect, do not start advertising if a connection is already established. --- src/components/ble/AlertNotificationClient.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/components/ble/AlertNotificationClient.cpp') 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; +} -- cgit v1.2.3-70-g09d2