mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-08 09:20:36 +08:00
Using transfer priorities in protocol:: classes
This commit is contained in:
@@ -114,7 +114,8 @@ void DynamicNodeIDAllocationClient::handleAllocation(
|
||||
}
|
||||
|
||||
int DynamicNodeIDAllocationClient::start(const protocol::HardwareVersion& hardware_version,
|
||||
const NodeID preferred_node_id)
|
||||
const NodeID preferred_node_id,
|
||||
const TransferPriority transfer_priority)
|
||||
{
|
||||
terminate();
|
||||
|
||||
@@ -161,6 +162,11 @@ int DynamicNodeIDAllocationClient::start(const protocol::HardwareVersion& hardwa
|
||||
return res;
|
||||
}
|
||||
dnida_pub_.allowAnonymousTransfers();
|
||||
res = dnida_pub_.setPriority(transfer_priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
||||
res = dnida_sub_.start(AllocationCallback(this, &DynamicNodeIDAllocationClient::handleAllocation));
|
||||
if (res < 0)
|
||||
|
||||
Reference in New Issue
Block a user