From 3a880a09d64c999d9e1b25e72fd2da8d0d1d8b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 4 May 2017 16:39:51 +0200 Subject: [PATCH] mixer: add documentation --- src/systemcmds/mixer/mixer.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/systemcmds/mixer/mixer.cpp b/src/systemcmds/mixer/mixer.cpp index 996a220b91..40668cf156 100644 --- a/src/systemcmds/mixer/mixer.cpp +++ b/src/systemcmds/mixer/mixer.cpp @@ -38,6 +38,7 @@ */ #include +#include #include #include #include @@ -47,7 +48,6 @@ #include #include -#include #include #include @@ -110,8 +110,21 @@ usage(const char *reason) PX4_INFO("%s", reason); } - PX4_INFO("usage:"); - PX4_INFO(" mixer load "); + PRINT_MODULE_DESCRIPTION( + R"DESCR_STR( +### Description +Load or append mixer files to the ESC driver. + +Note that the driver must support the used ioctl's, which is the case on NuttX, but for example not on the RPi. +)DESCR_STR"); + + + PRINT_MODULE_USAGE_NAME("mixer", "command"); + + PRINT_MODULE_USAGE_COMMAND("load"); + PRINT_MODULE_USAGE_ARG(" ", "Output device (eg. /dev/pwm_output0) and mixer file", false); + PRINT_MODULE_USAGE_COMMAND("append"); + PRINT_MODULE_USAGE_ARG(" ", "Output device (eg. /dev/pwm_output0) and mixer file", false); } static int