mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-01 19:46:42 +00:00
Fixes #1294 Bluetooth-Wifi Deadlock
This commit is contained in:
parent
2627db66ff
commit
57ba626e4c
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#ifdef USE_NEW_ESP32_BLUETOOTH
|
#ifdef USE_NEW_ESP32_BLUETOOTH
|
||||||
#include "ESP32Bluetooth.h"
|
#include "ESP32Bluetooth.h"
|
||||||
|
#include "mesh/http/WiFiAPClient.h"
|
||||||
#else
|
#else
|
||||||
#include "nimble/BluetoothUtil.h"
|
#include "nimble/BluetoothUtil.h"
|
||||||
#endif
|
#endif
|
||||||
@ -41,13 +42,15 @@ static void printBLEinfo() {
|
|||||||
#ifdef USE_NEW_ESP32_BLUETOOTH
|
#ifdef USE_NEW_ESP32_BLUETOOTH
|
||||||
void setBluetoothEnable(bool on) {
|
void setBluetoothEnable(bool on) {
|
||||||
|
|
||||||
if (!esp32Bluetooth) {
|
if (!isWifiAvailable()) {
|
||||||
esp32Bluetooth = new ESP32Bluetooth();
|
if (!esp32Bluetooth) {
|
||||||
}
|
esp32Bluetooth = new ESP32Bluetooth();
|
||||||
if (on) {
|
}
|
||||||
esp32Bluetooth->setup();
|
if (on) {
|
||||||
} else {
|
esp32Bluetooth->setup();
|
||||||
esp32Bluetooth->shutdown();
|
} else {
|
||||||
|
esp32Bluetooth->shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user