aboutsummaryrefslogtreecommitdiff
path: root/src/examples/publisher/publisher_main.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-11 10:58:47 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-12-11 10:58:47 +0100
commitfd6a5fd38b194300788c597fd1636b2a97e24642 (patch)
tree5fe4063f6d8a3f5507eb40438ea2dd39784b958d /src/examples/publisher/publisher_main.cpp
parent173b1b2a8bcf2344be92b1f6e5acbc089a43fcab (diff)
downloadpx4-firmware-fd6a5fd38b194300788c597fd1636b2a97e24642.tar.gz
px4-firmware-fd6a5fd38b194300788c597fd1636b2a97e24642.tar.bz2
px4-firmware-fd6a5fd38b194300788c597fd1636b2a97e24642.zip
move px4::init call
Diffstat (limited to 'src/examples/publisher/publisher_main.cpp')
-rw-r--r--src/examples/publisher/publisher_main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/publisher/publisher_main.cpp b/src/examples/publisher/publisher_main.cpp
index 8b692d963..5b50ecc6c 100644
--- a/src/examples/publisher/publisher_main.cpp
+++ b/src/examples/publisher/publisher_main.cpp
@@ -54,8 +54,6 @@ 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");
-
if (argc < 1) {
errx(1, "usage: publisher {start|stop|status}");
}
@@ -103,6 +101,8 @@ extern "C" __EXPORT int publisher_main(int argc, char *argv[])
PX4_MAIN_FUNCTION(publisher)
{
+ px4::init(argc, argv, "publisher");
+
PX4_INFO("starting");
PublisherExample p;
thread_running = true;