text: (window.webpackJsonp=window.webpackJsonp||[]).push([[1244],{2619:function(t,a,e){"use strict";e.r(a);var s=e(19),r=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"模块参考-驱动"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#模块参考-驱动"}},[t._v("#")]),t._v(" 模块参考：驱动")]),t._v(" "),e("p",[t._v("子分类")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/zh/modules/modules_driver_imu.html"}},[t._v("Imu")])],1),t._v(" "),e("li",[t._v("[Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/drivers/distance_sensor/pga460",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/distance_sensor/pga460"),e("OutboundLink")],1),t._v("](modules_driver_distance_sensor.md)")]),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/zh/modules/modules_driver_airspeed_sensor.html"}},[t._v("Airspeed Sensor")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/zh/modules/modules_driver_baro.html"}},[t._v("Baro")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/zh/modules/modules_driver_optical_flow.html"}},[t._v("光流")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/zh/modules/modules_driver_magnetometer.html"}},[t._v("磁力计")])],1)]),t._v(" "),e("h2",{attrs:{id:"adc"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#adc"}},[t._v("#")]),t._v(" adc")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/adc/board_adc",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/adc/board_adc"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("To write to flash to set parameters. address, number_of_bytes, byte0, ... , byteN")]),t._v(" "),e("p",[e("a",{attrs:{id:"adc_usage"}})]),t._v(" "),e("h3",{attrs:{id:"用法"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("adc <command> [arguments...]\n Commands:\n   start\n\n   test\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"fmu"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fmu"}},[t._v("#")]),t._v(" fmu")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/drivers/px4fmu",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/px4fmu"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"ads1115_usage"}})]),t._v(" "),e("h3",{attrs:{id:"用法-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-2"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("ads1115 <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 72\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"atxxxx"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#atxxxx"}},[t._v("#")]),t._v(" atxxxx")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h3",{attrs:{id:"描述-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-2"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("例如，安装在OmnibusF4SD板子上的用于OSD驱动的ATXXXX芯片")]),t._v(" "),e("p",[t._v("The module is configured via mode_* commands. This defines which of the first N pins the driver should occupy. By using mode_pwm4 for example, pins 5 and 6 can be used by the camera trigger driver or by a PWM rangefinder driver. Alternatively, the fmu can be started in one of the capture modes, and then drivers can register a capture callback with ioctl calls.")]),t._v(" "),e("p",[e("a",{attrs:{id:"atxxxx_usage"}})]),t._v(" "),e("h3",{attrs:{id:"用法-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-3"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("atxxxx <command> [arguments...]\n Commands:\n   start\n     [-s]        Internal SPI bus(es)\n     [-S]        External SPI bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-c <val>]  chip-select index (for external SPI)\n                 default: 1\n     [-m <val>]  SPI mode\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"batt-smbus"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#batt-smbus"}},[t._v("#")]),t._v(" batt_smbus")]),t._v(" "),e("p",[t._v("源码位置: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/drivers/batt_smbus",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/batt_smbus"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-3"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("用于智能电池的BQ40Z50电量统计芯片")]),t._v(" "),e("h3",{attrs:{id:"示例"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),e("p",[t._v("To start at address 0x0B, on bus 4")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("batt_smbus -X write_flash 19069 2 27 0\n")])])]),e("p",[e("a",{attrs:{id:"batmon_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-4"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("batmon <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 11\n\n   man_info      Prints manufacturer info.\n\n   unseal        解锁设备的flash来使能 write_flash 命令\n\n   seal          锁住设备的flash来失能 write_flash 命令.\n\n   suspend       从调度循环中挂起该设备\n")])])]),e("h2",{attrs:{id:"batt-smbus-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#batt-smbus-2"}},[t._v("#")]),t._v(" batt_smbus")]),t._v(" "),e("p",[t._v("Capture input (rising and falling edges) and print on the console: start the fmu in one of the capture modes:")]),t._v(" "),e("h3",{attrs:{id:"用法-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-4"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("p",[t._v("This will enable capturing on the 4th pin. Then do:")]),t._v(" "),e("h3",{attrs:{id:"用法-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-5"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("p",[t._v("To write to flash to set parameters. address, number_of_bytes, byte0, ... , byteN")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("batt_smbus -X write_flash 19069 2 27 0\n")])])]),e("p",[e("a",{attrs:{id:"batt_smbus_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-5"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("batt_smbus <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 11\n\n   man_info      Prints manufacturer info.\n\n   unseal        Unseals the devices flash memory to enable write_flash\n                 commands.\n\n   seal          Seals the devices flash memory to disbale write_flash commands.\n\n   suspend       Suspends the driver from rescheduling the cycle.\n\n   resume        Resumes the driver from suspension.\n\n   write_flash   Writes to flash. The device must first be unsealed with the\n                 unseal command.\n     [address]   The address to start writing.\n     [number of bytes] Number of bytes to send.\n     [data[0]...data[n]] One byte of data at a time separated by spaces.\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"bst"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#bst"}},[t._v("#")]),t._v(" bst")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/telemetry/bst",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/telemetry/bst"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"bst_usage"}})]),t._v(" "),e("h3",{attrs:{id:"示例-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例-2"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("bst <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 118\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"sf1xx"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sf1xx"}},[t._v("#")]),t._v(" sf1xx")]),t._v(" "),e("p",[t._v("GPS driver module that handles the communication with the device and publishes the position via uORB. It supports multiple protocols (device vendors) and by default automatically selects the correct one.")]),t._v(" "),e("h3",{attrs:{id:"用法-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-6"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("p",[t._v("This is the DShot output driver. It is similar to the fmu driver, and can be used as drop-in replacement to use DShot as ESC communication protocol instead of PWM.")]),t._v(" "),e("p",[t._v("It supports:")]),t._v(" "),e("ul",[e("li",[t._v("DShot150, DShot300, DShot600, DShot1200")]),t._v(" "),e("li",[t._v("通过独立的串口遥控，并且发布esc_status消息")]),t._v(" "),e("li",[t._v("通过命令行接口发送 DShot 命令")])]),t._v(" "),e("h3",{attrs:{id:"描述-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-6"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("Permanently reverse motor 1:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("dshot reverse -m 1\ndshot save -m 1\n")])])]),e("p",[t._v("After saving, the reversed direction will be regarded as the normal one. So to reverse again repeat the same commands.")]),t._v(" "),e("p",[e("a",{attrs:{id:"dshot_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-7"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-7"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("dshot <command> [arguments...]\n mc_att_control <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        打印状态信息\n")])])]),e("h2",{attrs:{id:"fmu-mode-pwm"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fmu-mode-pwm"}},[t._v("#")]),t._v(" fmu mode_pwm")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/examples/fake_gps",target:"_blank",rel:"noopener noreferrer"}},[t._v("examples/fake_gps"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述-8"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-8"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[e("a",{attrs:{id:"fake_gps_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-9"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-9"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("fake_gps <command> [arguments...]\n mc_att_control <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        打印状态信息\n")])])]),e("h2",{attrs:{id:"fake-imu"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fake-imu"}},[t._v("#")]),t._v(" fake_imu")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/examples/fake_imu",target:"_blank",rel:"noopener noreferrer"}},[t._v("examples/fake_imu"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述-10"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-10"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[e("a",{attrs:{id:"fake_imu_usage"}})]),t._v(" "),e("h3",{attrs:{id:"实现"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#实现"}},[t._v("#")]),t._v(" 实现")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("fake_imu <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"gps"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#gps"}},[t._v("#")]),t._v(" gps")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/examples/fake_magnetometer",target:"_blank",rel:"noopener noreferrer"}},[t._v("examples/fake_magnetometer"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"示例-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例-3"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),e("p",[t._v("模块支持一个辅助（secondary） GPS 设备，可使用 "),e("code",[t._v("-e")]),t._v(" 参数进行指定。 辅助 GPS 的位置信息会在第二个 uORB 主题实例上发布，但目前为止系统的其它部分暂未使用该数据（但该数据会被记录下来，以方便进行对比）。")]),t._v(" "),e("p",[e("a",{attrs:{id:"fake_magnetometer_usage"}})]),t._v(" "),e("h3",{attrs:{id:"用法-7"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-7"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("fake_magnetometer <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"gps-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#gps-2"}},[t._v("#")]),t._v(" gps")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/gps",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/gps"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述-11"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-11"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("GPS driver module that handles the communication with the device and publishes the position via uORB. It supports multiple protocols (device vendors) and by default automatically selects the correct one.")]),t._v(" "),e("p",[t._v("The module supports a secondary GPS device, specified via "),e("code",[t._v("-e")]),t._v(" parameter. The position will be published on the second uORB topic instance, but it's currently not used by the rest of the system (however the data will be logged, so that it can be used for comparisons).")]),t._v(" "),e("h3",{attrs:{id:"描述-12"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-12"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("There is a thread for each device polling for data. The GPS protocol classes are implemented with callbacks so that they can be used in other projects as well (eg. QGroundControl uses them too).")]),t._v(" "),e("h3",{attrs:{id:"用法-8"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-8"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("p",[t._v("This module does the RC input parsing and auto-selecting the method. Supported methods are:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("gps start -d /dev/ttyS3 -e /dev/ttyS4\n")])])]),e("p",[t._v("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.")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("gps reset warm\n")])])]),e("p",[e("a",{attrs:{id:"gps_usage"}})]),t._v(" "),e("h3",{attrs:{id:"用法-9"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#用法-9"}},[t._v("#")]),t._v(" 用法")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("gps <command> [arguments...]\n Commands:\n   start\n     [-d <val>]  GPS device\n                 values: <file:dev>, default: /dev/ttyS3\n     [-b <val>]  Baudrate (can also be p:<param_name>)\n                 default: 0\n     [-e <val>]  Optional secondary GPS device\n                 values: <file:dev>\n     [-g <val>]  Baudrate (secondary GPS, can also be p:<param_name>)\n                 default: 0\n     [-s]        Enable publication of satellite info\n     [-i <val>]  GPS interface\n                 values: spi|uart, default: uart\n     [-j <val>]  secondary GPS interface\n                 values: spi|uart, default: uart\n     [-p <val>]  GPS Protocol (default=auto select)\n                 values: ubx|mtk|ash|eml|fem\n\n   stop\n\n   status        print status info\n\n   reset         Reset GPS device\n     cold|warm|hot Specify reset type\n")])])]),e("h2",{attrs:{id:"ina226"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ina226"}},[t._v("#")]),t._v(" ina226")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/drivers/distance_sensor/sf1xx",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/distance_sensor/sf1xx"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"使用"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("p",[t._v("Driver for the INA226 power monitor.")]),t._v(" "),e("p",[t._v("Multiple instances of this driver can run simultaneously, if each instance has a separate bus OR I2C address.")]),t._v(" "),e("p",[t._v("Attempt to start driver on any bus (start on bus where first sensor found).")]),t._v(" "),e("p",[t._v("If the INA226 module is not powered, then by default, initialization of the driver will fail. To change this, use the -f flag. If this flag is set, then if initialization fails, the driver will keep trying to initialize again every 0.5 seconds. With this flag set, you can plug in a battery after the driver starts, and it will work. Without this flag set, the battery must be plugged in before starting the driver.")]),t._v(" "),e("p",[e("a",{attrs:{id:"ina226_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-13"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-13"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("ina226 <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 65\n     [-k]        if initialization (probing) fails, keep retrying periodically\n     [-t <val>]  battery index for calibration values (1 or 2)\n                 default: 1\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"fmu-mode-pwm3cap1"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fmu-mode-pwm3cap1"}},[t._v("#")]),t._v(" fmu mode_pwm3cap1")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/telemetry/iridiumsbd",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/telemetry/iridiumsbd"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述-14"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-14"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("This module controls the TAP_ESC hardware via UART. It listens on the actuator_controls topics, does the mixing and writes the PWM outputs.")]),t._v(" "),e("p",[t._v("Currently the module is implementd as a threaded version only, meaning that it runs in its own thread instead of on the work queue.")]),t._v(" "),e("p",[e("a",{attrs:{id:"iridiumsbd_usage"}})]),t._v(" "),e("h3",{attrs:{id:"实现-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#实现-2"}},[t._v("#")]),t._v(" 实现")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("iridiumsbd <command> [arguments...]\n Commands:\n   start\n     -d <val>    Serial device\n                 values: <file:dev>\n     [-v]        Enable verbose output\n\n   test\n     [s|read|AT <cmd>] Test command\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"pga460"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pga460"}},[t._v("#")]),t._v(" pga460")]),t._v(" "),e("p",[t._v("The module is typically started with: tap_esc start -d /dev/ttyS2 -n")]),t._v(" "),e("p",[e("a",{attrs:{id:"irlock_usage"}})]),t._v(" "),e("h3",{attrs:{id:"示例-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例-4"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("irlock <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 84\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"linux-pwm-out"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#linux-pwm-out"}},[t._v("#")]),t._v(" linux_pwm_out")]),t._v(" "),e("p",[t._v("该模块监听 actuator_controls 主题，执行混控并写入 PWM 输出。")]),t._v(" "),e("h3",{attrs:{id:"使用-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-2"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("p",[t._v("Linux PWM output driver with board-specific backend implementation.")]),t._v(" "),e("p",[e("a",{attrs:{id:"linux_pwm_out_usage"}})]),t._v(" "),e("h3",{attrs:{id:"使用-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-3"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("linux_pwm_out <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"lsm303agr"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lsm303agr"}},[t._v("#")]),t._v(" lsm303agr")]),t._v(" "),e("p",[t._v("通常使用如下命令：")]),t._v(" "),e("p",[e("a",{attrs:{id:"lsm303agr_usage"}})]),t._v(" "),e("h3",{attrs:{id:"使用-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-4"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("lsm303agr <command> [arguments...]\n Commands:\n   start\n     [-s]        Internal SPI bus(es)\n     [-S]        External SPI bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-c <val>]  chip-select index (for external SPI)\n                 default: 1\n     [-m <val>]  SPI mode\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-R <val>]  Rotation\n                 default: 0\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"newpixel"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#newpixel"}},[t._v("#")]),t._v(" newpixel")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/lights/neopixel",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/lights/neopixel"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"描述-15"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-15"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("This module is responsible for driving interfasing to the Neopixel Serial LED")]),t._v(" "),e("h3",{attrs:{id:"实现-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#实现-3"}},[t._v("#")]),t._v(" 实现")]),t._v(" "),e("p",[t._v("It is typically started with:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("neopixel -n 8\n")])])]),e("p",[t._v("To drive all available leds.")]),t._v(" "),e("p",[e("a",{attrs:{id:"newpixel_usage"}})]),t._v(" "),e("h3",{attrs:{id:"示例-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例-5"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("newpixel <command> [arguments...]\n Commands:\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"paw3902"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#paw3902"}},[t._v("#")]),t._v(" paw3902")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/optical_flow/paw3902",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/optical_flow/paw3902"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"paw3902_usage"}})]),t._v(" "),e("h3",{attrs:{id:"使用-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-5"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("paw3902 <command> [arguments...]\n Commands:\n   start\n     [-s]        Internal SPI bus(es)\n     [-S]        External SPI bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-c <val>]  chip-select index (for external SPI)\n                 default: 1\n     [-m <val>]  SPI mode\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-Y <val>]  custom yaw rotation (degrees)\n                 default: 0\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"pca9685"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pca9685"}},[t._v("#")]),t._v(" pca9685")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/pca9685",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/pca9685"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"pca9685_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-16"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-16"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pca9685 <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 64\n\n   reset\n\n   test          enter test mode\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"pwm-out-sim"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pwm-out-sim"}},[t._v("#")]),t._v(" pwm_out_sim")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/pca9685_pwm_out",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/pca9685_pwm_out"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"使用-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-6"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("It listens on the actuator_controls topics, does the mixing and writes the PWM outputs.")]),t._v(" "),e("h3",{attrs:{id:"使用-7"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-7"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("p",[t._v("This module depends on ModuleBase and OutputModuleInterface. IIC communication is based on CDev::I2C")]),t._v(" "),e("h3",{attrs:{id:"描述-17"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-17"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("It is typically started with:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pca9685_pwm_out start -a 64 -b 1\n")])])]),e("p",[t._v("Use the "),e("code",[t._v("mixer")]),t._v(" command to load mixer files. "),e("code",[t._v("mixer load /dev/pwm_outputX etc/mixers/quad_x.main.mix")]),t._v(" The number X can be acquired by executing "),e("code",[t._v("pca9685_pwm_out status")]),t._v(" when this driver is running.")]),t._v(" "),e("p",[e("a",{attrs:{id:"pca9685_pwm_out_usage"}})]),t._v(" "),e("h3",{attrs:{id:"使用-8"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-8"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pca9685_pwm_out <command> [arguments...]\n Commands:\n   start         Start the task\n     [-a <val>]  device address on this bus\n                 default: 64\n     [-b <val>]  bus that pca9685 is connected to\n                 default: 1\n     [-r <val>]  schedule rate limit\n                 default: 400\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"pcf8583"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pcf8583"}},[t._v("#")]),t._v(" pcf8583")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/rpm/pcf8583",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/rpm/pcf8583"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"pcf8583_usage"}})]),t._v(" "),e("h3",{attrs:{id:"使用-9"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#使用-9"}},[t._v("#")]),t._v(" 使用")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pcf8583 <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 80\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"rc-input"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#rc-input"}},[t._v("#")]),t._v(" rc_input")]),t._v(" "),e("p",[t._v("源码："),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/drivers/pwm_out_sim",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/pwm_out_sim"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"pmw3901_usage"}})]),t._v(" "),e("h3",{attrs:{id:"描述-18"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述-18"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pmw3901 <command> [arguments...]\n Commands:\n   start\n     [-s]        Internal SPI bus(es)\n     [-S]        External SPI bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-c <val>]  chip-select index (for external SPI)\n                 default: 1\n     [-m <val>]  SPI mode\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-R <val>]  Rotation\n                 default: 0\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"pwm-out"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pwm-out"}},[t._v("#")]),t._v(" pwm_out")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/pwm_out",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/pwm_out"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"实现-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#实现-4"}},[t._v("#")]),t._v(" 实现")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("It listens on the actuator_controls topics, does the mixing and writes the PWM outputs.")]),t._v(" "),e("p",[t._v("The module is configured via mode_* commands. This defines which of the first N pins the driver should occupy. By using mode_pwm4 for example, pins 5 and 6 can be used by the camera trigger driver or by a PWM rangefinder driver. Alternatively, pwm_out can be started in one of the capture modes, and then drivers can register a capture callback with ioctl calls.")]),t._v(" "),e("h3",{attrs:{id:"示例-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例-6"}},[t._v("#")]),t._v(" 示例")]),t._v(" "),e("p",[t._v("源码："),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/drivers/rc_input",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/rc_input"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),e("p",[t._v("It is typically started with:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pwm_out mode_pwm\n")])])]),e("p",[t._v("To drive all available pins.")]),t._v(" "),e("p",[t._v("Capture input (rising and falling edges) and print on the console: start pwm_out in one of the capture modes:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pwm_out mode_pwm3cap1\n")])])]),e("p",[t._v("This will enable capturing on the 4th pin. Then do:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pwm_out test\n")])])]),e("p",[t._v("Use the "),e("code",[t._v("pwm")]),t._v(" command for further configurations (PWM rate, levels, ...), and the "),e("code",[t._v("mixer")]),t._v(" command to load mixer files.")]),t._v(" "),e("p",[e("a",{attrs:{id:"pwm_out_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pwm_out <command> [arguments...]\n Commands:\n   start         Start the task (without any mode set, use any of the mode_*\n                 cmds)\n\n All of the mode_* commands will start pwm_out if not running already\n\n   mode_gpio\n\n   mode_pwm      Select all available pins as PWM\n\n   mode_pwm14\n\n   mode_pwm12\n\n   mode_pwm8\n\n   mode_pwm6\n\n   mode_pwm5\n\n   mode_pwm5cap1\n\n   mode_pwm4\n\n   mode_pwm4cap1\n\n   mode_pwm4cap2\n\n   mode_pwm3\n\n   mode_pwm3cap1\n\n   mode_pwm2\n\n   mode_pwm2cap2\n\n   mode_pwm1\n\n   sensor_reset  Do a sensor reset (SPI bus)\n     [<ms>]      Delay time in ms between reset and re-enabling\n\n   peripheral_reset Reset board peripherals\n     [<ms>]      Delay time in ms between reset and re-enabling\n\n   i2c           Configure I2C clock rate\n     <bus_id> <rate> Specify the bus id (>=0) and rate in Hz\n\n   test          Test inputs and outputs\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"pwm-out-sim-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pwm-out-sim-2"}},[t._v("#")]),t._v(" pwm_out_sim")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/pwm_out_sim",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/pwm_out_sim"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Driver for simulated PWM outputs.")]),t._v(" "),e("p",[t._v("Its only function is to take "),e("code",[t._v("actuator_control")]),t._v(" uORB messages, mix them with any loaded mixer and output the result to the "),e("code",[t._v("actuator_output")]),t._v(" uORB topic.")]),t._v(" "),e("p",[t._v("It is used in SITL and HITL.")]),t._v(" "),e("p",[e("a",{attrs:{id:"pwm_out_sim_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-2"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("pwm_out_sim <command> [arguments...]\n Commands:\n   start         Start the module\n     [-m <val>]  Mode\n                 values: hil|sim, default: sim\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"px4flow"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#px4flow"}},[t._v("#")]),t._v(" px4flow")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/optical_flow/px4flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/optical_flow/px4flow"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"px4flow_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-3"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("px4flow <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 66\n     [-R <val>]  Rotation (default=downwards)\n                 default: 25\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"rc-input-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#rc-input-2"}},[t._v("#")]),t._v(" rc_input")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/rc_input",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/rc_input"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-2"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This module does the RC input parsing and auto-selecting the method. Supported methods are:")]),t._v(" "),e("ul",[e("li",[t._v("PPM")]),t._v(" "),e("li",[t._v("SBUS")]),t._v(" "),e("li",[t._v("DSM")]),t._v(" "),e("li",[t._v("SUMD")]),t._v(" "),e("li",[t._v("ST24")]),t._v(" "),e("li",[t._v("TBS Crossfire (CRSF)")])]),t._v(" "),e("p",[e("a",{attrs:{id:"rc_input_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-4"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("rc_input <command> [arguments...]\n Commands:\n   start\n     [-d <val>]  RC device\n                 values: <file:dev>, default: /dev/ttyS3\n\n   bind          Send a DSM bind command (module must be running)\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"rgbled"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#rgbled"}},[t._v("#")]),t._v(" rgbled")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/lights/rgbled_ncp5623c",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/lights/rgbled_ncp5623c"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"rgbled_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-5"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("rgbled <command> [arguments...]\n Commands:\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 57\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"roboclaw"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#roboclaw"}},[t._v("#")]),t._v(" roboclaw")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/roboclaw",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/roboclaw"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-3"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This driver communicates over UART with the "),e("a",{attrs:{href:"http://downloads.basicmicro.com/docs/roboclaw_user_manual.pdf",target:"_blank",rel:"noopener noreferrer"}},[t._v("Roboclaw motor driver"),e("OutboundLink")],1),t._v(". It performs two tasks:")]),t._v(" "),e("ul",[e("li",[t._v("Control the motors based on the "),e("code",[t._v("actuator_controls_0")]),t._v(" UOrb topic.")]),t._v(" "),e("li",[t._v("Read the wheel encoders and publish the raw data in the "),e("code",[t._v("wheel_encoders")]),t._v(" UOrb topic")])]),t._v(" "),e("p",[t._v("In order to use this driver, the Roboclaw should be put into Packet Serial mode (see the linked documentation), and your flight controller's UART port should be connected to the Roboclaw as shown in the documentation. For Pixhawk 4, use the "),e("code",[t._v("UART & I2C B")]),t._v(" port, which corresponds to "),e("code",[t._v("/dev/ttyS3")]),t._v(".")]),t._v(" "),e("h3",{attrs:{id:"implementation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#implementation"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),e("p",[t._v("The main loop of this module (Located in "),e("code",[t._v("RoboClaw.cpp::task_main()")]),t._v(") performs 2 tasks:")]),t._v(" "),e("ol",[e("li",[t._v("Write "),e("code",[t._v("actuator_controls_0")]),t._v(" messages to the Roboclaw as they become available")]),t._v(" "),e("li",[t._v("Read encoder data from the Roboclaw at a constant, fixed rate.")])]),t._v(" "),e("p",[t._v("Because of the latency of UART, this driver does not write every single "),e("code",[t._v("actuator_controls_0")]),t._v(" message to the Roboclaw immediately. Instead, it is rate limited based on the parameter "),e("code",[t._v("RBCLW_WRITE_PER")]),t._v(".")]),t._v(" "),e("p",[t._v("On startup, this driver will attempt to read the status of the Roboclaw to verify that it is connected. If this fails, the driver terminates immediately.")]),t._v(" "),e("h3",{attrs:{id:"examples-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#examples-2"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),e("p",[t._v("The command to start this driver is:")]),t._v(" "),e("p",[t._v("$ roboclaw start "),e("device",[e("baud")],1)],1),t._v(" "),e("p",[e("code",[t._v("<device>")]),t._v(" is the name of the UART port. On the Pixhawk 4, this is "),e("code",[t._v("/dev/ttyS3")]),t._v(". "),e("code",[t._v("<baud>")]),t._v(" is te baud rate.")]),t._v(" "),e("p",[t._v("All available commands are:")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("$ roboclaw start <device> <baud>")])]),t._v(" "),e("li",[e("code",[t._v("$ roboclaw status")])]),t._v(" "),e("li",[e("code",[t._v("$ roboclaw stop")])])]),t._v(" "),e("p",[e("a",{attrs:{id:"roboclaw_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-6"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("roboclaw <command> [arguments...]\n Commands:\n")])])]),e("h2",{attrs:{id:"safety-button"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#safety-button"}},[t._v("#")]),t._v(" safety_button")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/safety_button",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/safety_button"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-4"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This module is responsible for the safety button. Pressing the safety button 3 times quickly will trigger a GCS pairing request.")]),t._v(" "),e("p",[e("a",{attrs:{id:"safety_button_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-7"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-7"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("safety_button <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"tone-alarm"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tone-alarm"}},[t._v("#")]),t._v(" tone_alarm")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/tone_alarm",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/tone_alarm"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-5"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This module is responsible for the tone alarm.")]),t._v(" "),e("p",[e("a",{attrs:{id:"tone_alarm_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-8"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-8"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("tone_alarm <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"vmount"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vmount"}},[t._v("#")]),t._v(" vmount")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/modules/vmount",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/vmount"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-6"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Mount (Gimbal) control driver. It maps several different input methods (eg. RC or MAVLink) to a configured output (eg. AUX channels or MAVLink).")]),t._v(" "),e("p",[t._v("Documentation how to use it is on the "),e("a",{attrs:{href:"https://dev.px4.io/master/en/advanced/gimbal_control.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("gimbal_control"),e("OutboundLink")],1),t._v(" page.")]),t._v(" "),e("h3",{attrs:{id:"implementation-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#implementation-2"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),e("p",[t._v("Each method is implemented in its own class, and there is a common base class for inputs and outputs. They are connected via an API, defined by the "),e("code",[t._v("ControlData")]),t._v(" data structure. This makes sure that each input method can be used with each output method and new inputs/outputs can be added with minimal effort.")]),t._v(" "),e("h3",{attrs:{id:"examples-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#examples-3"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),e("p",[t._v("Test the output by setting a fixed yaw angle (and the other axes to 0):")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("vmount stop\nvmount test yaw 30\n")])])]),e("p",[e("a",{attrs:{id:"vmount_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-9"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-9"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("vmount <command> [arguments...]\n Commands:\n   start\n\n   test          Test the output: set a fixed angle for one axis (vmount must\n                 not be running)\n     roll|pitch|yaw <angle> Specify an axis and an angle in degrees\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"voxlpm"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#voxlpm"}},[t._v("#")]),t._v(" voxlpm")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/power_monitor/voxlpm",target:"_blank",rel:"noopener noreferrer"}},[t._v("drivers/power_monitor/voxlpm"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{id:"voxlpm_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-10"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-10"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("voxlpm [arguments...]\n   start\n     [-I]        Internal I2C bus(es)\n     [-X]        External I2C bus(es)\n     [-b <val>]  board-specific bus (default=all) (external SPI: n-th bus\n                 (default=1))\n     [-f <val>]  bus frequency in kHz\n     [-q]        quiet startup (no message if no device found)\n     [-a <val>]  I2C address\n                 default: 68\n     [-T <val>]  Type\n                 values: VBATT|P5VDC|P12VDC, default: VBATT\n     [-k]        if initialization (probing) fails, keep retrying periodically\n\n   stop\n\n   status        print status info\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]);