From 6216f8bf97eb3f3754fb9dc11c5dda70d8bcb171 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 3 Mar 2024 10:07:43 -0600 Subject: [PATCH] Remove rangetest file on factory reset --- src/mesh/NodeDB.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 506adda5ce..dc8d7540ca 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -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();