mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-12 08:19:39 +00:00
add FS macro guards
This commit is contained in:
parent
9be3b7bdc5
commit
72664b04f1
@ -115,9 +115,11 @@ bool NodeDB::factoryReset()
|
||||
LOG_INFO("Performing factory reset!\n");
|
||||
// first, remove the "/prefs" (this removes most prefs)
|
||||
rmDir("/prefs");
|
||||
#ifdef FSCom
|
||||
if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) {
|
||||
LOG_WARN("Could not remove rangetest.csv file\n");
|
||||
}
|
||||
#endif
|
||||
// second, install default state (this will deal with the duplicate mac address issue)
|
||||
installDefaultDeviceState();
|
||||
installDefaultConfig();
|
||||
|
@ -198,11 +198,13 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
||||
}
|
||||
case meshtastic_AdminMessage_delete_file_request_tag: {
|
||||
LOG_DEBUG("Client is requesting to delete file: %s\n", r->delete_file_request);
|
||||
#ifdef FSCom
|
||||
if (FSCom.remove(r->delete_file_request)) {
|
||||
LOG_DEBUG("Successfully deleted file\n");
|
||||
} else {
|
||||
LOG_DEBUG("Failed to delete file\n");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#ifdef ARCH_PORTDUINO
|
||||
|
Loading…
Reference in New Issue
Block a user