Module documentation: switch to Markdown

This commit is contained in:
Beat Küng
2017-07-14 11:57:11 +02:00
parent 6c9574b336
commit 053eb12329
6 changed files with 48 additions and 16 deletions
+15 -5
View File
@@ -3493,11 +3493,13 @@ int PX4FMU::print_usage(const char *reason)
PRINT_MODULE_DESCRIPTION(
R"DESCR_STR(
This module is responsible for driving the output and reading the input pins for boards without a separate IO chip
(eg. Pixracer). On boards with an IO chip, the px4io driver is used.
### Description
This module is responsible for driving the output and reading the input pins. For boards without a separate IO chip
(eg. Pixracer), it uses the main channels. On boards with an IO chip (eg. Pixhawk), it uses the AUX channels, and the
px4io driver is used for main ones.
It listens on the actuator_controls topics, does the mixing and writes the PWM outputs.
In addition it does the RC input parsing and auto-select the method. Supported methods are:
In addition it does the RC input parsing and auto-selecting the method. Supported methods are:
- PPM
- SBUS
- DSM
@@ -3508,17 +3510,25 @@ The module is configured via mode_* commands. This defines which of the first N
By using mode_pwm4 for example, pins 5 and 6 can be used by the camera trigger driver or by a PWM rangefinder
driver.
### Implementation
By default the module runs on the work queue, to reduce RAM usage. It can also be run in its own thread,
specified via start flag -t, to reduce latency.
When running on the work queue, it schedules at a fixed frequency, and the pwm rate limits the update rate of
the actuator_controls topics. In case of running in its own thread, the module polls on the actuator_controls topic.
Additionally the pwm rate defines the lower-level IO timer rates.
### Examples
It is typically started with:
$ fmu mode_pwm
To drive all available pins.
Use the 'pwm' command for further configurations (PWM rate, levels, ...).
Capture input (rising and falling edges) and print on the console: start the fmu in one of the capture modes:
$ fmu mode_pwm3cap1
This will enable capturing on the 4th pin. Then do:
$ fmu test
Use the `pwm` command for further configurations (PWM rate, levels, ...), and the `mixer` command to load
mixer files.
)DESCR_STR");
PRINT_MODULE_USAGE_NAME("fmu", "driver");
@@ -3528,7 +3538,7 @@ Use the 'pwm' command for further configurations (PWM rate, levels, ...).
PRINT_MODULE_USAGE_PARAM_COMMENT("All of the mode_* commands will start the fmu if not running already");
PRINT_MODULE_USAGE_COMMAND("mode_gpio");
PRINT_MODULE_USAGE_COMMAND("mode_rcin");
PRINT_MODULE_USAGE_COMMAND_DESCR("mode_rcin", "Only do RC input, no PWM outputs");
PRINT_MODULE_USAGE_COMMAND_DESCR("mode_pwm", "Select all available pins as PWM");
#if defined(BOARD_HAS_PWM)
PRINT_MODULE_USAGE_COMMAND("mode_pwm1");