BT sleep leak now down to about 200 bytes

This commit is contained in:
geeksville
2020-02-23 18:09:40 -08:00
parent 621beadb5c
commit 419dd44ff6
6 changed files with 41 additions and 11 deletions

View File

@@ -224,6 +224,14 @@ void deinitBLE()
{
assert(pServer);
pServer->getAdvertising()->stop();
destroyUpdateService();
pUpdate->stop();
pDevInfo->stop();
pUpdate->stop(); // we delete them below
// First shutdown bluetooth
BLEDevice::deinit(false);
@@ -235,7 +243,6 @@ void deinitBLE()
delete pServer;
batteryLevelC = NULL; // Don't let anyone generate bogus notifies
destroyUpdateService();
for (int i = 0; i < numChars; i++)
delete chars[i];