mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +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:
commit
8ac8c4d59d
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue