mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 05:13:34 +08:00
Reworked file naming and use ROM fs as fall back
The server will now attempt to provide files from the primary
path RootPath and then the alternate AltRootPath. This alows
a layered approch to file service.
Setting the RootPath to an SD card and the AltRootPath to a
ROM FS will allow a user to provide an updated uavcan firware
file that will be used instead of the baked in one without
any copying.
The path as been removed from the interactions with nodes.
There by supporting Non-compliant nodes that could not
handle the specified path length.
The vitrual pathing has been moved into the FDCache.
This commit is contained in:
committed by
Daniel Agar
parent
04377cc270
commit
29e1aa6c12
@@ -345,12 +345,7 @@ class FirmwareUpdateTrigger : public INodeInfoListener,
|
||||
protocol::file::BeginFirmwareUpdate::Request req;
|
||||
|
||||
req.source_node_id = getNode().getNodeID().get();
|
||||
if (!common_path_prefix_.empty())
|
||||
{
|
||||
req.image_file_remote_path.path += common_path_prefix_.c_str();
|
||||
req.image_file_remote_path.path.push_back(protocol::file::Path::SEPARATOR);
|
||||
}
|
||||
req.image_file_remote_path.path += path->c_str();
|
||||
req.image_file_remote_path.path = path->c_str();
|
||||
|
||||
UAVCAN_TRACE("FirmwareUpdateTrigger", "Request to %d with path: %s",
|
||||
int(node_id.get()), req.image_file_remote_path.path.c_str());
|
||||
@@ -396,6 +391,7 @@ public:
|
||||
*/
|
||||
int start(NodeInfoRetriever& node_info_retriever,
|
||||
const FirmwareFilePath& arg_common_path_prefix = FirmwareFilePath(),
|
||||
const FirmwareFilePath& arg_alt_path_prefix = FirmwareFilePath(),
|
||||
const TransferPriority priority = TransferPriority::OneHigherThanLowest)
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user