aboutsummaryrefslogtreecommitdiff
path: root/src/examples/publisher/publisher_main.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-11 10:51:19 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-12-11 10:51:19 +0100
commit173b1b2a8bcf2344be92b1f6e5acbc089a43fcab (patch)
tree63afb74e15312ecf8c60800962895e217c6e634c /src/examples/publisher/publisher_main.cpp
parenta1685ed6d093ec01214e6839ea66f9dd565e55ce (diff)
downloadpx4-firmware-173b1b2a8bcf2344be92b1f6e5acbc089a43fcab.tar.gz
px4-firmware-173b1b2a8bcf2344be92b1f6e5acbc089a43fcab.tar.bz2
px4-firmware-173b1b2a8bcf2344be92b1f6e5acbc089a43fcab.zip
WIP, make class based and extended subscriber/publisher example compile for ros
Diffstat (limited to 'src/examples/publisher/publisher_main.cpp')
-rw-r--r--src/examples/publisher/publisher_main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/examples/publisher/publisher_main.cpp b/src/examples/publisher/publisher_main.cpp
index c4e79aaa6..8b692d963 100644
--- a/src/examples/publisher/publisher_main.cpp
+++ b/src/examples/publisher/publisher_main.cpp
@@ -51,6 +51,7 @@ using namespace px4;
PX4_MAIN_FUNCTION(publisher);
+#if !defined(__linux) && !(defined(__APPLE__) && defined(__MACH__))
extern "C" __EXPORT int publisher_main(int argc, char *argv[])
{
px4::init(argc, argv, "publisher");
@@ -98,15 +99,16 @@ extern "C" __EXPORT int publisher_main(int argc, char *argv[])
warnx("unrecognized command");
return 1;
}
+#endif
PX4_MAIN_FUNCTION(publisher)
{
- warnx("starting");
+ PX4_INFO("starting");
PublisherExample p;
thread_running = true;
p.main();
- warnx("exiting.");
+ PX4_INFO("exiting.");
thread_running = false;
return 0;
}