From eb0e705ba973a9596bf677c5ce185bbcfc279f7d Mon Sep 17 00:00:00 2001 From: Todd Herbert Date: Thu, 4 Apr 2024 17:04:10 +1300 Subject: [PATCH] de-init bluetooth --- src/nimble/NimbleBluetooth.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index bc94abf6e..0b91bf44f 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -112,6 +112,12 @@ void NimbleBluetooth::shutdown() NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising(); pAdvertising->reset(); pAdvertising->stop(); + +#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) + // Saving of ~1mA + // Probably applicable to other ESP32 boards - unverified + NimBLEDevice::deinit(); +#endif } bool NimbleBluetooth::isActive()