de-init bluetooth

This commit is contained in:
Todd Herbert 2024-04-04 17:04:10 +13:00
parent 46ad4bf0e5
commit eb0e705ba9

View File

@ -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()