remove /prefs for nrf factory reset

This commit is contained in:
Mike Kinney 2022-03-17 19:10:58 +00:00
parent 5b8ff56731
commit f2a4308497

View File

@ -95,14 +95,16 @@ bool NodeDB::resetRadioConfig()
nvs_flash_erase();
#endif
#ifdef NRF52_SERIES
Bluefruit.begin();
FS.rmdir_r("/prefs");
DEBUG_MSG("Clearing bluetooth bonds!\n");
bond_print_list(BLE_GAP_ROLE_PERIPH);
bond_print_list(BLE_GAP_ROLE_CENTRAL);
Bluefruit.begin();
Bluefruit.Periph.clearBonds();
Bluefruit.Central.clearBonds();
DEBUG_MSG("Clearing bluetooth bonds!\n");
bond_print_list(BLE_GAP_ROLE_PERIPH);
bond_print_list(BLE_GAP_ROLE_CENTRAL);
Bluefruit.Periph.clearBonds();
Bluefruit.Central.clearBonds();
#endif
didFactoryReset = true;
}