mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 14:43:33 +08:00
Publisher init() overload with priority argument
This commit is contained in:
@@ -126,6 +126,15 @@ public:
|
||||
return checkInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* This overload allows to set the priority; otherwise it's the same.
|
||||
*/
|
||||
int init(TransferPriority priority)
|
||||
{
|
||||
setPriority(priority);
|
||||
return checkInit();
|
||||
}
|
||||
|
||||
int publish(const DataStruct& message, TransferType transfer_type, NodeID dst_node_id,
|
||||
MonotonicTime blocking_deadline = MonotonicTime())
|
||||
{
|
||||
|
||||
@@ -324,6 +324,16 @@ public:
|
||||
return publisher_.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shall be called before first use.
|
||||
* This overload allows to set the priority, otherwise it's the same.
|
||||
* Returns negative error code.
|
||||
*/
|
||||
int init(TransferPriority priority)
|
||||
{
|
||||
return publisher_.init(priority);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs non-blocking service call.
|
||||
* This method transmits the service request and returns immediately.
|
||||
|
||||
Reference in New Issue
Block a user