Remove rangetest file on factory reset (#3322)

This commit is contained in:
Ben Meadors 2024-03-03 10:33:30 -06:00 committed by GitHub
parent e3063a2785
commit 3c3d391044
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,6 +130,9 @@ bool NodeDB::factoryReset()
LOG_INFO("Performing factory reset!\n");
// first, remove the "/prefs" (this removes most prefs)
rmDir("/prefs");
if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) {
LOG_WARN("Could not remove rangetest.csv file\n");
}
// second, install default state (this will deal with the duplicate mac address issue)
installDefaultDeviceState();
installDefaultConfig();