Clean up and added comments about the esp32 sdk bug

This commit is contained in:
Jm Casler
2020-09-16 22:31:07 -07:00
parent 493b25f23e
commit 73b47a78aa
3 changed files with 42 additions and 46 deletions

View File

@@ -523,12 +523,12 @@ void setBluetoothEnable(bool on)
if (firstTime) {
firstTime = 0;
} else {
reconnectWiFi();
initWifi();
}
} else {
// We have to totally teardown our bluetooth objects to prevent leaks
deinitBLE();
deinitWifi(); // shutdown wifi
deinitBLE();
Serial.printf("Shutdown BT: %u heap size\n", ESP.getFreeHeap());
// ESP_ERROR_CHECK( heap_trace_stop() );