Browse Source

Add module docs for tfmini driver

sbg
Hamish Willee 6 years ago committed by Beat Küng
parent
commit
48105ba878
  1. 29
      src/drivers/distance_sensor/tfmini/tfmini.cpp

29
src/drivers/distance_sensor/tfmini/tfmini.cpp

@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
#include <px4_config.h>
#include <px4_workqueue.h>
#include <px4_getopt.h>
#include <px4_module.h>
#include <sys/types.h>
#include <sys/ioctl.h>
@ -823,8 +824,32 @@ info() @@ -823,8 +824,32 @@ info()
void
usage()
{
printf("usage:\n");
printf("tfmini start -d <device path> -R (optional) <rotation>:\n");
PRINT_MODULE_DESCRIPTION(
R"DESCR_STR(
### Description
Serial bus driver for the Benewake TFmini LiDAR.
Most boards are configured to enable/start the driver on a specified UART using the SENS_TFMINI_CFG parameter.
Setup/usage information: https://docs.px4.io/en/sensor/tfmini.html
### Examples
Attempt to start driver on a specified serial device.
$ tfmini start -d /dev/ttyS1
Stop driver
$ tfmini stop
)DESCR_STR");
PRINT_MODULE_USAGE_NAME("tfmini", "driver");
PRINT_MODULE_USAGE_SUBCATEGORY("distance_sensor");
PRINT_MODULE_USAGE_COMMAND_DESCR("start","Start driver");
PRINT_MODULE_USAGE_PARAM_STRING('d', nullptr, nullptr, "Serial device", false);
PRINT_MODULE_USAGE_PARAM_INT('R', 25, 1, 25, "Sensor rotation - downward facing by default", true);
PRINT_MODULE_USAGE_COMMAND_DESCR("stop","Stop driver");
PRINT_MODULE_USAGE_COMMAND_DESCR("test","Test driver (basic functional tests)");
PRINT_MODULE_USAGE_COMMAND_DESCR("info","Print driver information");
}
} // namespace

Loading…
Cancel
Save