mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-29 13:00:25 +00:00
Merge pull request #1991 from weebl2000/prevent-auto-restart-ble-nrf52
Prevent auto-restarting BLE when disabling it on nRF52
This commit is contained in:
@@ -246,6 +246,7 @@ void SerialBLEInterface::enable() {
|
||||
clearBuffers();
|
||||
_last_health_check = millis();
|
||||
|
||||
Bluefruit.Advertising.restartOnDisconnect(true);
|
||||
Bluefruit.Advertising.start(0);
|
||||
}
|
||||
|
||||
@@ -259,8 +260,9 @@ void SerialBLEInterface::disable() {
|
||||
_isEnabled = false;
|
||||
BLE_DEBUG_PRINTLN("SerialBLEInterface: disable");
|
||||
|
||||
disconnect();
|
||||
Bluefruit.Advertising.restartOnDisconnect(false);
|
||||
Bluefruit.Advertising.stop();
|
||||
disconnect();
|
||||
_last_health_check = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user