Clear bluetooth bonds on multi-press and factory_reset (#1176)

* Clear bluetooth bonds on multi-press and factory_reset
This commit is contained in:
Ben Meadors
2022-02-01 18:32:26 -06:00
committed by GitHub
parent dd31a829fb
commit b21b7de04b
6 changed files with 40 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ void setBluetoothEnable(bool on)
else {
nrf52Bluetooth = new NRF52Bluetooth();
nrf52Bluetooth->setup();
// We delay brownout init until after BLE because BLE starts soft device
initBrownout();
}
@@ -185,4 +185,12 @@ void cpuDeepSleep(uint64_t msecToWake)
delay(5000);
DEBUG_MSG(".");
}
}
void clearBonds() {
if (!nrf52Bluetooth) {
nrf52Bluetooth = new NRF52Bluetooth();
nrf52Bluetooth->setup();
}
nrf52Bluetooth->clearBonds();
}