aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/px4_publisher.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/platforms/px4_publisher.h')
-rw-r--r--src/platforms/px4_publisher.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/platforms/px4_publisher.h b/src/platforms/px4_publisher.h
index 53e63b695..9ce211d25 100644
--- a/src/platforms/px4_publisher.h
+++ b/src/platforms/px4_publisher.h
@@ -43,6 +43,7 @@
#else
/* includes when building for NuttX */
#include <uORB/Publication.hpp>
+#include <containers/List.hpp>
#endif
namespace px4
@@ -60,16 +61,24 @@ private:
ros::Publisher _ros_pub;
};
#else
-template<typename M>
class Publisher :
- public uORB::Publication<M>
+ public uORB::PublicationNode
+{
public:
- Publisher(List<SubscriptionBase *> * list,
- const struct orb_metadata *meta, unsigned interval) :
- uORB::Publication(list, meta)
+ Publisher(const struct orb_metadata *meta,
+ List<uORB::PublicationNode *> * list) :
+ uORB::PublicationNode(meta, list)
{}
~Publisher() {};
-{
+ template<typename M>
+ int publish(const M &msg) {
+ uORB::PublicationBase::update((void*)&msg);
+ return 0;
+ }
+
+ void update() {
+ //XXX list traversal callback, needed?
+ } ;
};
#endif
}