From 9cd24a56468f3ccf876193d9cb3e225a5f866095 Mon Sep 17 00:00:00 2001 From: Jm Date: Sat, 9 Jan 2021 18:27:03 -0800 Subject: [PATCH] is linux fixed now? --- src/nimble/BluetoothUtil.cpp | 6 +++++- src/nrf52/wifi-stubs.cpp | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/nimble/BluetoothUtil.cpp b/src/nimble/BluetoothUtil.cpp index 37fb54d5..18ffb1ed 100644 --- a/src/nimble/BluetoothUtil.cpp +++ b/src/nimble/BluetoothUtil.cpp @@ -545,7 +545,9 @@ void setBluetoothEnable(bool on) if (firstTime) { firstTime = 0; } else { - initWifi(0); +#ifndef NO_ESP32 + initWifi(); +#endif } } else { @@ -557,7 +559,9 @@ void setBluetoothEnable(bool on) */ // shutdown wifi +#ifndef NO_ESP32 deinitWifi(); +#endif // We have to totally teardown our bluetooth objects to prevent leaks deinitBLE(); diff --git a/src/nrf52/wifi-stubs.cpp b/src/nrf52/wifi-stubs.cpp index 8be0b41f..3de751ef 100644 --- a/src/nrf52/wifi-stubs.cpp +++ b/src/nrf52/wifi-stubs.cpp @@ -1,4 +1,7 @@ //#include "mesh/wifi/WebServer.h" + +#ifndef NO_ESP32 + #include "mesh/wifi/WiFiAPClient.h" void initWifi(bool forceSoftAP) {} @@ -9,3 +12,5 @@ bool isWifiAvailable() { return false; } + +#endif