From fd6a5fd38b194300788c597fd1636b2a97e24642 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Thu, 11 Dec 2014 10:58:47 +0100 Subject: [PATCH] move px4::init call --- src/examples/publisher/publisher_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/examples/publisher/publisher_main.cpp b/src/examples/publisher/publisher_main.cpp index 8b692d9633..5b50ecc6ca 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;