mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 04:00:35 +08:00
NetworkCompatibilityChecker will not be executed at each Node<>::start(), there's special method for that - Node<>::checkNetworkCompatibility()
This commit is contained in:
@@ -108,15 +108,7 @@ static uavcan_linux::NodePtr initNode(const std::vector<std::string>& ifaces, ua
|
||||
auto node = uavcan_linux::makeNode(ifaces);
|
||||
node->setNodeID(nid);
|
||||
node->setName(name.c_str());
|
||||
|
||||
uavcan::NetworkCompatibilityCheckResult init_result;
|
||||
const int start_res = node->start(init_result);
|
||||
ENFORCE(0 == start_res);
|
||||
if (!init_result.isOk())
|
||||
{
|
||||
throw std::runtime_error("Network conflict with node " + std::to_string(init_result.conflicting_node.get()));
|
||||
}
|
||||
|
||||
ENFORCE(0 == node->start()); // This node doesn't check its network compatibility
|
||||
node->setStatusOk();
|
||||
return node;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user