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.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/platforms/px4_publisher.h b/src/platforms/px4_publisher.h
index 72f69a5af..53e63b695 100644
--- a/src/platforms/px4_publisher.h
+++ b/src/platforms/px4_publisher.h
@@ -38,7 +38,11 @@
*/
#pragma once
#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__))
+/* includes when building for ros */
#include "ros/ros.h"
+#else
+/* includes when building for NuttX */
+#include <uORB/Publication.hpp>
#endif
namespace px4
@@ -56,7 +60,15 @@ private:
ros::Publisher _ros_pub;
};
#else
-class Publisher
+template<typename M>
+class Publisher :
+ public uORB::Publication<M>
+public:
+ Publisher(List<SubscriptionBase *> * list,
+ const struct orb_metadata *meta, unsigned interval) :
+ uORB::Publication(list, meta)
+ {}
+ ~Publisher() {};
{
};
#endif