From 317c8bf557d35f4041e4252b77181eff43d0e811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 27 Apr 2017 17:22:14 +0200 Subject: [PATCH] uorb: update usage --- src/modules/uORB/uORBMain.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/uORB/uORBMain.cpp b/src/modules/uORB/uORBMain.cpp index 8f0047deae..eeef7d184b 100644 --- a/src/modules/uORB/uORBMain.cpp +++ b/src/modules/uORB/uORBMain.cpp @@ -37,15 +37,19 @@ #include "uORB.h" #include "uORBCommon.hpp" #include +#include extern "C" { __EXPORT int uorb_main(int argc, char *argv[]); } static uORB::DeviceMaster *g_dev = nullptr; static void usage() { - PX4_INFO("Usage: uorb 'start', 'status', 'top [-a] [ [ ...]]'"); - PX4_INFO(" -a: print all instead of only currently publishing topics"); - PX4_INFO(" : topic(s) to match (implies -a)"); + PRINT_MODULE_USAGE_NAME("uorb", "communication"); + PRINT_MODULE_USAGE_COMMAND("start"); + PRINT_MODULE_USAGE_COMMAND_DESCR("status", "Print topic statistics"); + PRINT_MODULE_USAGE_COMMAND_DESCR("top", "Monitor topic publication rates"); + PRINT_MODULE_USAGE_PARAM_FLAG('a', "print all instead of only currently publishing topics", true); + PRINT_MODULE_USAGE_ARG(" []", "topic(s) to match (implies -a)", true); } int @@ -58,8 +62,6 @@ uorb_main(int argc, char *argv[]) /* * Start/load the driver. - * - * XXX it would be nice to have a wrapper for this... */ if (!strcmp(argv[1], "start")) {