mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
Enabled deletion of files created by the range-test module
This commit is contained in:
@@ -298,4 +298,21 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool RangeTestModuleRadio::removeFile()
|
||||
{
|
||||
#ifdef ARCH_ESP32
|
||||
char *fp = "/static/rangetest.csv";
|
||||
if (FSCom.exists(fp)) {
|
||||
LOG_INFO("Deleting previous range test.");
|
||||
bool result = FSCom.remove(fp);
|
||||
if (!result) {
|
||||
LOG_ERROR("Failed to delete rangeTest.csv");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
};
|
||||
Reference in New Issue
Block a user