Merge pull request #30 from sirfragles/fix

Fix by @sirfragles
This commit is contained in:
m-hertig 2023-08-07 16:36:21 +02:00 committed by GitHub
commit 5d8259a886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -3,7 +3,9 @@
#include "ble_notification.h"
#include "FreeRTOS.h" // For asynchronous tasks
#include "freertos/FreeRTOS.h" // For asynchronous tasks
#include "freertos/task.h"
#include "Arduino.h"
class BLEAddress;
class BLERemoteCharacteristic;

View File

@ -108,11 +108,13 @@ bool BLENotifications::begin(const char * name) {
BLEDevice::setSecurityCallbacks(new NotificationSecurityCallbacks()); // @todo memory leak?
startAdvertising();
return true;
}
bool BLENotifications::stop() {
ESP_LOGI(LOG_TAG, "stop()");
BLEDevice::deinit(false);
return true;
}