mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 06:20:36 +08:00
publisher: use wrapper message type
This commit is contained in:
@@ -126,10 +126,10 @@ public:
|
||||
/** Publishes msg
|
||||
* @param msg the message which is published to the topic
|
||||
*/
|
||||
template<typename M>
|
||||
int publish(const M &msg)
|
||||
template<typename T>
|
||||
int publish(const T &msg)
|
||||
{
|
||||
_uorb_pub->update((void *)&msg);
|
||||
_uorb_pub->update((void *)&(msg.data()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user