mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
NRF52 bluetooth cleanup and fix (#3328)
* NRF52 bluetooth cleanup. Fixes BLE not returning after serial PhoneAPI connection * Use new var name in esp32 arch
This commit is contained in:
@@ -20,21 +20,21 @@
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
|
||||
void setBluetoothEnable(bool on)
|
||||
void setBluetoothEnable(bool enable)
|
||||
{
|
||||
if (!isWifiAvailable() && config.bluetooth.enabled == true) {
|
||||
if (!nimbleBluetooth) {
|
||||
nimbleBluetooth = new NimbleBluetooth();
|
||||
}
|
||||
if (on && !nimbleBluetooth->isActive()) {
|
||||
if (enable && !nimbleBluetooth->isActive()) {
|
||||
nimbleBluetooth->setup();
|
||||
} else if (!on) {
|
||||
} else if (!enable) {
|
||||
nimbleBluetooth->shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void setBluetoothEnable(bool on) {}
|
||||
void setBluetoothEnable(bool enable) {}
|
||||
void updateBatteryLevel(uint8_t level) {}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user