mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 11:39:32 +00:00
Enabled deletion of files created by the range-test module
This commit is contained in:
parent
7505fe7a7c
commit
9b0fbcf1d9
@ -298,4 +298,21 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 1;
|
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);
|
bool appendFile(const meshtastic_MeshPacket &mp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup range test data from filesystem
|
||||||
|
*/
|
||||||
|
bool removeFile();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Called to handle a particular incoming message
|
/** Called to handle a particular incoming message
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user