add FS macro guards

This commit is contained in:
Thomas Göttgens
2024-03-18 15:09:23 +01:00
parent 9be3b7bdc5
commit 72664b04f1
2 changed files with 4 additions and 0 deletions

View File

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