mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-04 18:49:00 +00:00
Enabled deletion of files created by the range-test module
This commit is contained in:
parent
fe3f14a63e
commit
35d9e68053
@ -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;
|
||||
};
|
@ -44,6 +44,11 @@ class RangeTestModuleRadio : public SinglePortModule
|
||||
*/
|
||||
bool appendFile(const meshtastic_MeshPacket &mp);
|
||||
|
||||
/**
|
||||
* Cleanup range test data from filesystem
|
||||
*/
|
||||
bool removeFile();
|
||||
|
||||
protected:
|
||||
/** Called to handle a particular incoming message
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user