(ESP32) Fix bluetooth after light-sleep; de-init for deep sleep (#3655)

This commit is contained in:
todd-herbert
2024-04-19 00:27:18 +12:00
committed by GitHub
parent 2e14234b77
commit 747c713ba9
5 changed files with 13 additions and 12 deletions

View File

@@ -30,9 +30,10 @@ void setBluetoothEnable(bool enable)
}
if (enable && !nimbleBluetooth->isActive()) {
nimbleBluetooth->setup();
} else if (!enable) {
nimbleBluetooth->shutdown();
}
// For ESP32, no way to recover from bluetooth shutdown without reboot
// BLE advertising automatically stops when MCU enters light-sleep(?)
// For deep-sleep, shutdown hardware with nimbleBluetooth->deinit(). Requires reboot to reverse
}
}
#else