mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 19:49:19 +00:00
Check filesystem mounted
This commit is contained in:
parent
f6bb1977bc
commit
e6a2df5b6d
@ -303,15 +303,24 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
|
|||||||
bool RangeTestModuleRadio::removeFile()
|
bool RangeTestModuleRadio::removeFile()
|
||||||
{
|
{
|
||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
if (FSCom.exists("/static/rangetest.csv")) {
|
if (!FSBegin()) {
|
||||||
LOG_INFO("Deleting previous range test.");
|
LOG_DEBUG("An Error has occurred while mounting the filesystem");
|
||||||
bool result = FSCom.remove("/static/rangetest.csv");
|
return 0;
|
||||||
if (!result) {
|
|
||||||
LOG_ERROR("Failed to delete rangeTest.csv");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
LOG_INFO("Range test removed.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!FSCom.exists("/static/rangetest.csv")) {
|
||||||
|
LOG_DEBUG("No range tests found.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO("Deleting previous range test.");
|
||||||
|
bool result = FSCom.remove("/static/rangetest.csv");
|
||||||
|
|
||||||
|
if (!result) {
|
||||||
|
LOG_ERROR("Failed to delete range test.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
LOG_INFO("Range test removed.");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user