mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 01:17:51 +08:00
Move PX4 Guide source into /docs (#24490)
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
<Redirect to="modules_main" />
|
||||
|
||||
# Modules
|
||||
|
||||
This is a placholder for modules docs.
|
||||
Built but not in sidebar.
|
||||
@@ -0,0 +1,71 @@
|
||||
# 适用于开发完整应用的模版
|
||||
|
||||
An application can be written to run as either a _task_ (a module with its own stack and process priority) or as a _work queue task_ (a module that runs on a work queue thread, sharing the stack and thread priority with other tasks on the work queue).
|
||||
在大多数情况下,可以使用工作队列任务,因为这会减少资源的使用。
|
||||
|
||||
:::info
|
||||
[Architectural Overview > Runtime Environment](../concept/architecture.md#runtime-environment) provides more information about tasks and work queue tasks.
|
||||
:::
|
||||
|
||||
:::info
|
||||
All the things learned in the [First Application Tutorial](../modules/hello_sky.md) are relevant for writing a full application.
|
||||
:::
|
||||
|
||||
## 工作队列任务
|
||||
|
||||
PX4-Autopilot contains a template for writing a new application (module) that runs as a _work queue task_:
|
||||
[src/examples/work_item](https://github.com/PX4/PX4-Autopilot/tree/main/src/examples/work_item).
|
||||
|
||||
工作队列任务应用程序与普通(任务)应用程序相同。 除了它需要指定它是一个工作队列任务,并在初始化期间运行调度它本身。
|
||||
|
||||
示例显示了如何操作。
|
||||
总结:
|
||||
|
||||
1. Specify the dependency on the work queue library in the cmake definition file ([CMakeLists.txt](https://github.com/PX4/PX4-Autopilot/blob/main/src/examples/work_item/CMakeLists.txt)):
|
||||
```
|
||||
...
|
||||
DEPENDS
|
||||
px4_work_queue
|
||||
```
|
||||
|
||||
2. In addition to `ModuleBase`, the task should also derive from `ScheduledWorkItem` (included from [ScheduledWorkItem.hpp](https://github.com/PX4/PX4-Autopilot/blob/main/platforms/common/include/px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp))
|
||||
|
||||
3. 在构造函数初始化中指定要添加任务的队列。
|
||||
The [work_item](https://github.com/PX4/PX4-Autopilot/blob/main/src/examples/work_item/WorkItemExample.cpp#L42) example adds itself to the `wq_configurations::test1` work queue as shown below:
|
||||
|
||||
```cpp
|
||||
WorkItemExample::WorkItemExample() :
|
||||
ModuleParams(nullptr),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::test1)
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
::: info
|
||||
The available work queues (`wq_configurations`) are listed in [WorkQueueManager.hpp](https://github.com/PX4/PX4-Autopilot/blob/main/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp#L49).
|
||||
|
||||
:::
|
||||
|
||||
4. Implement the `ScheduledWorkItem::Run()` method to perform "work".
|
||||
|
||||
5. Implement the `task_spawn` method, specifying that the task is a work queue (using the `task_id_is_work_queue` id.
|
||||
|
||||
6. Schedule the work queue task using one of the scheduling methods (in the example we use `ScheduleOnInterval` from within the `init` method).
|
||||
|
||||
## 任务
|
||||
|
||||
PX4/PX4-Autopilot contains a template for writing a new application (module) that runs as a task on its own stack:
|
||||
[src/templates/template_module](https://github.com/PX4/PX4-Autopilot/tree/main/src/templates/template_module).
|
||||
|
||||
该模板演示了完整应用程序所需或有用的以下附加功能/方面:
|
||||
|
||||
- 访问参数并对参数更新做出反应。
|
||||
- 订阅、等待 topic 更新。
|
||||
- Controlling the task that runs in the background via `start`/`stop`/`status`.
|
||||
The `module start [<arguments>]` command can then be directly added to the
|
||||
[startup script](../concept/system_startup.md).
|
||||
- 命令行参数解析。
|
||||
- Documentation: the `PRINT_MODULE_*` methods serve two purposes (the API is
|
||||
documented [in the source code](https://github.com/PX4/PX4-Autopilot/blob/v1.8.0/src/platforms/px4_module.h#L381)):
|
||||
- They are used to print the command-line usage when entering `module help` on the console.
|
||||
- They are automatically extracted via script to generate the [Modules & Commands Reference](../modules/modules_main.md) page.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Modules Reference: Autotune
|
||||
|
||||
## fw_autotune_attitude_control
|
||||
|
||||
Source: [modules/fw_autotune_attitude_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/fw_autotune_attitude_control)
|
||||
|
||||
### 描述
|
||||
|
||||
<a id="fw_autotune_attitude_control_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
fw_autotune_attitude_control <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[vtol] VTOL mode
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mc_autotune_attitude_control
|
||||
|
||||
Source: [modules/mc_autotune_attitude_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mc_autotune_attitude_control)
|
||||
|
||||
### 描述
|
||||
|
||||
<a id="mc_autotune_attitude_control_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
mc_autotune_attitude_control <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,167 @@
|
||||
# 模块参考:通信(Communication)
|
||||
|
||||
## frsky_telemetry
|
||||
|
||||
Source: [drivers/telemetry/frsky_telemetry](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/telemetry/frsky_telemetry)
|
||||
|
||||
FrSky 数传支持, FrSky Telemetry support. Auto-detects D or S.PORT protocol. <a id="frsky_telemetry_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
frsky_telemetry <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-d <val>] Select Serial Device
|
||||
values: <file:dev>, default: /dev/ttyS6
|
||||
[-t <val>] Scanning timeout [s] (default: no timeout)
|
||||
default: 0
|
||||
[-m <val>] Select protocol (default: auto-detect)
|
||||
values: sport|sport_single|sport_single_invert|dtype, default:
|
||||
auto
|
||||
|
||||
stop
|
||||
|
||||
status
|
||||
```
|
||||
|
||||
## mavlink
|
||||
|
||||
Source: [modules/mavlink](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mavlink)
|
||||
|
||||
### 描述
|
||||
|
||||
此模块实现了 MAVLink 协议,该协议可在串口或 UDP 网络上使用。
|
||||
This module implements the MAVLink protocol, which can be used on a Serial link or UDP network connection. It communicates with the system via uORB: some messages are directly handled in the module (eg. mission protocol), others are published via uORB (eg. vehicle_command).
|
||||
|
||||
流(Stream)被用来以特定速率发送周期性的消息,例如飞机姿态信息。
|
||||
Streams are used to send periodic messages with a specific rate, such as the vehicle attitude. When starting the mavlink instance, a mode can be specified, which defines the set of enabled streams with their rates. For a running instance, streams can be configured via <code>mavlink stream</code> command.
|
||||
For a running instance, streams can be configured via `mavlink stream` command.
|
||||
|
||||
可以存在多个该模块的实例,每个实例连接到一个串口设备或者网络端口。
|
||||
|
||||
### 实现
|
||||
|
||||
命令的具体实现使用了两个线程,分别为数据发送线程和接收线程。 The sender runs at a fixed rate and dynamically
|
||||
reduces the rates of the streams if the combined bandwidth is higher than the configured rate (`-r`) or the
|
||||
physical link becomes saturated. This can be checked with `mavlink status`, see if `rate mult` is less than 1.
|
||||
|
||||
**Careful**: some of the data is accessed and modified from both threads, so when changing code or extend the
|
||||
functionality, this needs to be take into account, in order to avoid race conditions and corrupt data.
|
||||
|
||||
### 示例
|
||||
|
||||
在 ttyS1 串口启动 mavlink ,并设定波特率为 921600、最大发送速率为 80kB/s:
|
||||
|
||||
```
|
||||
mavlink start -d /dev/ttyS1 -b 921600 -m onboard -r 80000
|
||||
```
|
||||
|
||||
在 UDP 端口 14556 启动 mavlink 并启用 50Hz 的 HIGHRES_IMU 消息:
|
||||
|
||||
```
|
||||
mavlink start -u 14556 -r 1000000
|
||||
mavlink stream -u 14556 -s HIGHRES_IMU -r 50
|
||||
```
|
||||
|
||||
<a id="mavlink_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
mavlink <command> [arguments...]
|
||||
Commands:
|
||||
start Start a new instance
|
||||
[-d <val>] Select Serial Device
|
||||
values: <file:dev>, default: /dev/ttyS1
|
||||
[-b <val>] Baudrate (can also be p:<param_name>)
|
||||
default: 57600
|
||||
[-r <val>] Maximum sending data rate in B/s (if 0, use baudrate / 20)
|
||||
default: 0
|
||||
[-p] Enable Broadcast
|
||||
[-u <val>] Select UDP Network Port (local)
|
||||
default: 14556
|
||||
[-o <val>] Select UDP Network Port (remote)
|
||||
default: 14550
|
||||
[-t <val>] Partner IP (broadcasting can be enabled via -p flag)
|
||||
default: 127.0.0.1
|
||||
[-m <val>] Mode: sets default streams and rates
|
||||
values: custom|camera|onboard|osd|magic|config|iridium|minimal|
|
||||
extvision|extvisionmin|gimbal|uavionix, default: normal
|
||||
[-n <val>] wifi/ethernet interface name
|
||||
values: <interface_name>
|
||||
[-c <val>] Multicast address (multicasting can be enabled via
|
||||
MAV_{i}_BROADCAST param)
|
||||
values: Multicast address in the range
|
||||
[239.0.0.0,239.255.255.255]
|
||||
[-F <val>] Sets the transmission frequency for iridium mode
|
||||
default: 0.0
|
||||
[-f] Enable message forwarding to other Mavlink instances
|
||||
[-w] Wait to send, until first message received
|
||||
[-x] Enable FTP
|
||||
[-z] Force hardware flow control always on
|
||||
[-Z] Force hardware flow control always off
|
||||
|
||||
stop-all Stop all instances
|
||||
|
||||
stop Stop a running instance
|
||||
[-u <val>] Select Mavlink instance via local Network Port
|
||||
[-d <val>] Select Mavlink instance via Serial Device
|
||||
values: <file:dev>
|
||||
|
||||
status Print status for all instances
|
||||
[streams] Print all enabled streams
|
||||
|
||||
stream Configure the sending rate of a stream for a running instance
|
||||
[-u <val>] Select Mavlink instance via local Network Port
|
||||
[-d <val>] Select Mavlink instance via Serial Device
|
||||
values: <file:dev>
|
||||
-s <val> Mavlink stream to configure
|
||||
-r <val> Rate in Hz (0 = turn off, -1 = set to default)
|
||||
|
||||
boot_complete Enable sending of messages. (Must be) called as last step in
|
||||
startup script.
|
||||
```
|
||||
|
||||
## uorb
|
||||
|
||||
Source: [systemcmds/uorb](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/uorb)
|
||||
|
||||
### 描述
|
||||
|
||||
uORB 是各模块之间进行通讯的基于 发布-订阅 机制的内部消息传递系统。
|
||||
|
||||
### 实现
|
||||
|
||||
The implementation is asynchronous and lock-free, ie. a publisher does not wait for a subscriber and vice versa.
|
||||
This is achieved by having a separate buffer between a publisher and a subscriber.
|
||||
|
||||
The code is optimized to minimize the memory footprint and the latency to exchange messages.
|
||||
|
||||
Messages are defined in the `/msg` directory. They are converted into C/C++ code at build-time.
|
||||
|
||||
该接口基于文件描述符(file descriptor)实现:它在内部使用 <code>read</code>、<code>write</code> 和 <code>ioctl</code>。 The interface is based on file descriptors: internally it uses <code>read</code>, <code>write</code> and <code>ioctl</code>. Except for the publications, which use <code>orb_advert_t</code> handles, so that they can be used from interrupts as well (on NuttX).
|
||||
|
||||
### 示例
|
||||
|
||||
Messages are defined in the <code>/msg</code> directory. They are converted into C/C++ code at build-time. Besides `top`, this is an important command for general system inspection:
|
||||
|
||||
```
|
||||
uorb top
|
||||
```
|
||||
|
||||
<a id="uorb_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
uorb <command> [arguments...]
|
||||
Commands:
|
||||
status Print topic statistics
|
||||
|
||||
top Monitor topic publication rates
|
||||
[-a] print all instead of only currently publishing topics with
|
||||
subscribers
|
||||
[-1] run only once, then exit
|
||||
[<filter1> [<filter2>]] topic(s) to match (implies -a)
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,195 @@
|
||||
# Modules Reference: Airspeed Sensor (Driver)
|
||||
|
||||
## asp5033
|
||||
|
||||
Source: [drivers/differential_pressure/asp5033](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/asp5033)
|
||||
|
||||
### 描述
|
||||
|
||||
Driver to enable an external [ASP5033]
|
||||
(https://www.qio-tek.com/index.php/product/qiotek-asp5033-dronecan-airspeed-and-compass-module/)
|
||||
TE connected via I2C.
|
||||
This is not included by default in firmware. It can be included with terminal command: "make <your_board> boardconfig"
|
||||
or in default.px4board with adding the line: "CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE_ASP5033=y"
|
||||
It can be enabled with the "SENS_EN_ASP5033" parameter set to 1.
|
||||
|
||||
<a id="asp5033_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
asp5033 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 109
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## auav
|
||||
|
||||
Source: [drivers/differential_pressure/auav](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/auav)
|
||||
|
||||
<a id="auav_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
auav <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-D] Differential pressure sensing
|
||||
[-A] Absolute pressure sensing
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 38
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ets_airspeed
|
||||
|
||||
Source: [drivers/differential_pressure/ets](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/ets)
|
||||
|
||||
<a id="ets_airspeed_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ets_airspeed <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 117
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ms4515
|
||||
|
||||
Source: [drivers/differential_pressure/ms4515](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/ms4515)
|
||||
|
||||
<a id="ms4515_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ms4515 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 70
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ms4525do
|
||||
|
||||
Source: [drivers/differential_pressure/ms4525do](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/ms4525do)
|
||||
|
||||
<a id="ms4525do_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ms4525do <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 40
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ms5525dso
|
||||
|
||||
Source: [drivers/differential_pressure/ms5525dso](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/ms5525dso)
|
||||
|
||||
<a id="ms5525dso_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ms5525dso <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 118
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## sdp3x
|
||||
|
||||
Source: [drivers/differential_pressure/sdp3x](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/sdp3x)
|
||||
|
||||
<a id="sdp3x_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
sdp3x <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 33
|
||||
[-k] if initialization (probing) fails, keep retrying periodically
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
@@ -0,0 +1,466 @@
|
||||
# Modules Reference: Baro (Driver)
|
||||
|
||||
## bmp280
|
||||
|
||||
Source: [drivers/barometer/bmp280](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/bmp280)
|
||||
|
||||
<a id="bmp280_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
bmp280 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 118
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## bmp388
|
||||
|
||||
Source: [drivers/barometer/bmp388](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/bmp388)
|
||||
|
||||
<a id="bmp388_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
bmp388 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 118
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## bmp581
|
||||
|
||||
Source: [drivers/barometer/bmp581](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/bmp581)
|
||||
|
||||
<a id="bmp581_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
bmp581 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 70
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## dps310
|
||||
|
||||
Source: [drivers/barometer/dps310](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/dps310)
|
||||
|
||||
<a id="dps310_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
dps310 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 119
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## icp101xx
|
||||
|
||||
Source: [drivers/barometer/invensense/icp101xx](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/invensense/icp101xx)
|
||||
|
||||
<a id="icp101xx_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
icp101xx <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 99
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## icp201xx
|
||||
|
||||
Source: [drivers/barometer/invensense/icp201xx](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/invensense/icp201xx)
|
||||
|
||||
<a id="icp201xx_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
icp201xx <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 99
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## lps22hb
|
||||
|
||||
Source: [drivers/barometer/lps22hb](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/lps22hb)
|
||||
|
||||
<a id="lps22hb_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
lps22hb <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## lps25h
|
||||
|
||||
Source: [drivers/barometer/lps25h](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/lps25h)
|
||||
|
||||
<a id="lps25h_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
lps25h <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## lps33hw
|
||||
|
||||
Source: [drivers/barometer/lps33hw](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/lps33hw)
|
||||
|
||||
<a id="lps33hw_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
lps33hw <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 93
|
||||
[-k] if initialization (probing) fails, keep retrying periodically
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mpc2520
|
||||
|
||||
Source: [drivers/barometer/maiertek/mpc2520](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/maiertek/mpc2520)
|
||||
|
||||
<a id="mpc2520_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
mpc2520 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 118
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mpl3115a2
|
||||
|
||||
Source: [drivers/barometer/mpl3115a2](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/mpl3115a2)
|
||||
|
||||
<a id="mpl3115a2_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
mpl3115a2 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 96
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ms5611
|
||||
|
||||
Source: [drivers/barometer/ms5611](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/ms5611)
|
||||
|
||||
<a id="ms5611_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ms5611 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-T <val>] Device type
|
||||
values: 5607|5611, default: 5611
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ms5837
|
||||
|
||||
Source: [drivers/barometer/ms5837](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/ms5837)
|
||||
|
||||
<a id="ms5837_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ms5837 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## spa06
|
||||
|
||||
Source: [drivers/barometer/goertek/spa06](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/goertek/spa06)
|
||||
|
||||
<a id="spa06_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
spa06 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 118
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## spl06
|
||||
|
||||
Source: [drivers/barometer/goertek/spl06](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/goertek/spl06)
|
||||
|
||||
<a id="spl06_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
spl06 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 118
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
@@ -0,0 +1,53 @@
|
||||
# Modules Reference: Camera (Driver)
|
||||
|
||||
## camera_trigger
|
||||
|
||||
Source: [drivers/camera_trigger](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/camera_trigger)
|
||||
|
||||
### 描述
|
||||
|
||||
Camera trigger driver.
|
||||
|
||||
This module triggers cameras that are connected to the flight-controller outputs,
|
||||
or simple MAVLink cameras that implement the MAVLink trigger protocol.
|
||||
|
||||
The driver responds to the following MAVLink trigger commands being found in missions or recieved over MAVLink:
|
||||
|
||||
- `MAV_CMD_DO_TRIGGER_CONTROL`
|
||||
- `MAV_CMD_DO_DIGICAM_CONTROL`
|
||||
- `MAV_CMD_DO_SET_CAM_TRIGG_DIST`
|
||||
- `MAV_CMD_OBLIQUE_SURVEY`
|
||||
|
||||
The commands cause the driver to trigger camera image capture based on time or distance.
|
||||
Each time an image capture is triggered, the `CAMERA_TRIGGER` MAVLink message is emitted.
|
||||
|
||||
A "simple MAVLink camera" is one that supports the above command set.
|
||||
When configured for this kind of camera, all the driver does is emit the `CAMERA_TRIGGER` MAVLink message as expected.
|
||||
The incoming commands must be forwarded to the MAVLink camera, and are automatically emitted to MAVLink channels
|
||||
when found in missions.
|
||||
|
||||
The driver is configured using [Camera Trigger parameters](../advanced_config/parameter_reference.md#camera-trigger).
|
||||
In particular:
|
||||
|
||||
- `TRIG_INTERFACE` - How the camera is connected to flight controller (PWM, GPIO, Seagull, MAVLink)
|
||||
- `TRIG_MODE` - Distance or time based triggering, with values set by `TRIG_DISTANCE` and `TRIG_INTERVAL`.
|
||||
|
||||
[Setup/usage information](../camera/index.md).
|
||||
|
||||
<a id="camera_trigger_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
camera_trigger <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop Stop driver
|
||||
|
||||
status Print driver status information
|
||||
|
||||
test Trigger one image (not logged or forwarded to GCS)
|
||||
|
||||
test_power Toggle power
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,44 @@
|
||||
# Modules Reference: Ins (Driver)
|
||||
|
||||
## vectornav
|
||||
|
||||
Source: [drivers/ins/vectornav](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/ins/vectornav)
|
||||
|
||||
### 描述
|
||||
|
||||
Serial bus driver for the VectorNav VN-100, VN-200, VN-300.
|
||||
|
||||
Most boards are configured to enable/start the driver on a specified UART using the SENS_VN_CFG parameter.
|
||||
|
||||
Setup/usage information: https://docs.px4.io/main/en/sensor/vectornav.html
|
||||
|
||||
### 示例
|
||||
|
||||
Attempt to start driver on a specified serial device.
|
||||
|
||||
```
|
||||
vectornav start -d /dev/ttyS1
|
||||
```
|
||||
|
||||
设置/使用 信息: https://docs.px4.io/master/en/sensor/leddar_one.html
|
||||
|
||||
```
|
||||
vectornav stop
|
||||
```
|
||||
|
||||
<a id="vectornav_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
vectornav <command> [arguments...]
|
||||
Commands:
|
||||
start Start driver
|
||||
-d <val> Serial device
|
||||
|
||||
status Driver status
|
||||
|
||||
stop Stop driver
|
||||
|
||||
status Print driver status
|
||||
```
|
||||
@@ -0,0 +1,438 @@
|
||||
# Modules Reference: Magnetometer (Driver)
|
||||
|
||||
## ak09916
|
||||
|
||||
Source: [drivers/magnetometer/akm/ak09916](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/akm/ak09916)
|
||||
|
||||
<a id="ak09916_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ak09916 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 12
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ak8963
|
||||
|
||||
Source: [drivers/magnetometer/akm/ak8963](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/akm/ak8963)
|
||||
|
||||
<a id="ak8963_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ak8963 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 12
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## bmm150
|
||||
|
||||
Source: [drivers/magnetometer/bosch/bmm150](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/bosch/bmm150)
|
||||
|
||||
<a id="bmm150_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
bmm150 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 16
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## bmm350
|
||||
|
||||
Source: [drivers/magnetometer/bosch/bmm350](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/bosch/bmm350)
|
||||
|
||||
<a id="bmm350_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
bmm350 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 20
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## hmc5883
|
||||
|
||||
Source: [drivers/magnetometer/hmc5883](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/hmc5883)
|
||||
|
||||
<a id="hmc5883_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
hmc5883 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
[-T] Enable temperature compensation
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## iis2mdc
|
||||
|
||||
Source: [drivers/magnetometer/st/iis2mdc](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/st/iis2mdc)
|
||||
|
||||
<a id="iis2mdc_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
iis2mdc <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 48
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ist8308
|
||||
|
||||
Source: [drivers/magnetometer/isentek/ist8308](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/isentek/ist8308)
|
||||
|
||||
<a id="ist8308_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ist8308 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 12
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ist8310
|
||||
|
||||
Source: [drivers/magnetometer/isentek/ist8310](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/isentek/ist8310)
|
||||
|
||||
<a id="ist8310_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ist8310 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 14
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## lis2mdl
|
||||
|
||||
Source: [drivers/magnetometer/lis2mdl](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/lis2mdl)
|
||||
|
||||
<a id="lis2mdl_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
lis2mdl <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 30
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## lis3mdl
|
||||
|
||||
Source: [drivers/magnetometer/lis3mdl](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/lis3mdl)
|
||||
|
||||
<a id="lis3mdl_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
lis3mdl <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 30
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
reset
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## lsm9ds1_mag
|
||||
|
||||
Source: [drivers/magnetometer/lsm9ds1_mag](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/lsm9ds1_mag)
|
||||
|
||||
<a id="lsm9ds1_mag_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
lsm9ds1_mag <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mmc5983ma
|
||||
|
||||
Source: [drivers/magnetometer/memsic/mmc5983ma](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/memsic/mmc5983ma)
|
||||
|
||||
<a id="mmc5983ma_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
mmc5983ma <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 48
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
reset
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## qmc5883l
|
||||
|
||||
Source: [drivers/magnetometer/qmc5883l](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/qmc5883l)
|
||||
|
||||
<a id="qmc5883l_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
qmc5883l <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 13
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## rm3100
|
||||
|
||||
Source: [drivers/magnetometer/rm3100](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/rm3100)
|
||||
|
||||
<a id="rm3100_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
rm3100 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-s] Internal SPI bus(es)
|
||||
[-S] External SPI bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-c <val>] chip-select pin (for internal SPI) or index (for external SPI)
|
||||
[-m <val>] SPI mode
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## vcm1193l
|
||||
|
||||
Source: [drivers/magnetometer/vtrantech/vcm1193l](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/vtrantech/vcm1193l)
|
||||
|
||||
<a id="vcm1193l_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
vcm1193l <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-R <val>] Rotation
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
# Modules Reference: Optical Flow (Driver)
|
||||
|
||||
## thoneflow
|
||||
|
||||
Source: [drivers/optical_flow/thoneflow](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/optical_flow/thoneflow)
|
||||
|
||||
### 描述
|
||||
|
||||
Serial bus driver for the ThoneFlow-3901U optical flow sensor.
|
||||
|
||||
Most boards are configured to enable/start the driver on a specified UART using the SENS_TFLOW_CFG parameter.
|
||||
|
||||
Setup/usage information: https://docs.px4.io/main/en/sensor/pmw3901.html#thone-thoneflow-3901u
|
||||
|
||||
### 示例
|
||||
|
||||
Attempt to start driver on a specified serial device.
|
||||
|
||||
```
|
||||
thoneflow start -d /dev/ttyS1
|
||||
```
|
||||
|
||||
设置/使用 信息: https://docs.px4.io/master/en/sensor/leddar_one.html
|
||||
|
||||
```
|
||||
thoneflow stop
|
||||
```
|
||||
|
||||
<a id="thoneflow_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
thoneflow <command> [arguments...]
|
||||
Commands:
|
||||
start Start driver
|
||||
-d <val> Serial device
|
||||
|
||||
stop Stop driver
|
||||
|
||||
info Print driver information
|
||||
```
|
||||
@@ -0,0 +1,28 @@
|
||||
# Modules Reference: Rpm Sensor (Driver)
|
||||
|
||||
## pcf8583
|
||||
|
||||
Source: [drivers/rpm/pcf8583](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/rpm/pcf8583)
|
||||
|
||||
<a id="pcf8583_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
pcf8583 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 80
|
||||
[-k] if initialization (probing) fails, keep retrying periodically
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
# Modules Reference: Transponder (Driver)
|
||||
|
||||
## sagetech_mxs
|
||||
|
||||
Source: [drivers/transponder/sagetech_mxs](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/transponder/sagetech_mxs)
|
||||
|
||||
```
|
||||
### Description
|
||||
|
||||
This driver integrates the Sagetech MXS Certified Transponder to send and receive ADSB messages and traffic.
|
||||
|
||||
### Examples
|
||||
|
||||
Attempt to start driver on a specified serial device.
|
||||
$ sagetech_mxs start -d /dev/ttyS1
|
||||
Stop driver
|
||||
$ sagetech_mxs stop
|
||||
Set Flight ID (8 char max)
|
||||
$ sagetech_mxs flight_id MXS12345
|
||||
Set MXS Operating Mode
|
||||
$ sagetech_mxs opmode off/on/stby/alt
|
||||
$ sagetech_mxs opmode 0/1/2/3
|
||||
Set the Squawk Code
|
||||
$ sagetech_mxs squawk 1200
|
||||
```
|
||||
|
||||
<a id="sagetech_mxs_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
sagetech_mxs <command> [arguments...]
|
||||
Commands:
|
||||
start Start driver
|
||||
-d <val> Serial device
|
||||
|
||||
stop Stop driver
|
||||
|
||||
flightid Set Flight ID (8 char max)
|
||||
|
||||
ident Set the IDENT bit in ADSB-Out messages
|
||||
|
||||
opmode Set the MXS operating mode. ('off', 'on', 'stby', 'alt', or
|
||||
numerical [0-3])
|
||||
|
||||
squawk Set the Squawk Code. [0-7777] Octal (no digit larger than 7)
|
||||
```
|
||||
@@ -0,0 +1,125 @@
|
||||
# 模块参考:估计器
|
||||
|
||||
## AttitudeEstimatorQ
|
||||
|
||||
Source: [modules/attitude_estimator_q](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/attitude_estimator_q)
|
||||
|
||||
### 描述
|
||||
|
||||
Attitude and position estimator using an Extended Kalman Filter. It is used for Multirotors and Fixed-Wing.
|
||||
|
||||
<a id="AttitudeEstimatorQ_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
AttitudeEstimatorQ <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## wind_estimator
|
||||
|
||||
Source: [modules/airspeed_selector](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/airspeed_selector)
|
||||
|
||||
### 描述
|
||||
|
||||
This module provides a single airspeed_validated topic, containing indicated (IAS),
|
||||
calibrated (CAS), true airspeed (TAS) and the information if the estimation currently
|
||||
is invalid and if based sensor readings or on groundspeed minus windspeed.
|
||||
Supporting the input of multiple "raw" airspeed inputs, this module automatically switches
|
||||
to a valid sensor in case of failure detection. For failure detection as well as for
|
||||
the estimation of a scale factor from IAS to CAS, it runs several wind estimators
|
||||
and also publishes those.
|
||||
|
||||
<a id="airspeed_estimator_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
airspeed_estimator <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## ekf2
|
||||
|
||||
Source: [modules/ekf2](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2)
|
||||
|
||||
### 描述
|
||||
|
||||
基于扩展卡尔曼滤波器的姿态和位置估计器。 该模块同时应用于多旋翼和固定翼飞机。
|
||||
|
||||
The documentation can be found on the [ECL/EKF Overview & Tuning](https://docs.px4.io/main/en/advanced_config/tuning_the_ecl_ekf.html) page.
|
||||
|
||||
ekf2 can be started in replay mode (`-r`): in this mode, it does not access the system time, but only uses the
|
||||
timestamps from the sensor topics.
|
||||
|
||||
<a id="ekf2_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
ekf2 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-r] Enable replay mode
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
[-v] verbose (print all states and full covariance matrix)
|
||||
|
||||
select_instance Request switch to new estimator instance
|
||||
<instance> Specify desired estimator instance
|
||||
```
|
||||
|
||||
## local_position_estimator
|
||||
|
||||
Source: [modules/local_position_estimator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/local_position_estimator)
|
||||
|
||||
### 描述
|
||||
|
||||
基于扩展卡尔曼滤波器的姿态和位置估计器。
|
||||
|
||||
<a id="local_position_estimator_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
local_position_estimator <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mc_hover_thrust_estimator
|
||||
|
||||
Source: [modules/mc_hover_thrust_estimator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mc_hover_thrust_estimator)
|
||||
|
||||
### 描述
|
||||
|
||||
<a id="mc_hover_thrust_estimator_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
mc_hover_thrust_estimator <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
@@ -0,0 +1,35 @@
|
||||
# Modules & Commands Reference
|
||||
|
||||
以下页面介绍了 PX4 模块, 驱动和命令。
|
||||
They describe the provided functionality, high-level implementation overview and how
|
||||
to use the command-line interface.
|
||||
|
||||
:::info
|
||||
**This is auto-generated from the source code** and contains the most recent modules documentation.
|
||||
:::
|
||||
|
||||
It is not a complete list and NuttX provides some additional commands
|
||||
as well (such as `free`). Use `help` on the console to get a list of all
|
||||
available commands, and in most cases `command help` will print the usage.
|
||||
|
||||
Since this is generated from source, errors must be reported/fixed
|
||||
in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) repository.
|
||||
文档页可以在固件目录的根目录下运行如下命令生成:
|
||||
|
||||
```
|
||||
make module_documentation
|
||||
```
|
||||
|
||||
The generated files will be written to the `modules` directory.
|
||||
|
||||
## 分类
|
||||
|
||||
- [Autotune](modules_autotune.md)
|
||||
- [Command](modules_command.md)
|
||||
- [Communication](modules_communication.md)
|
||||
- [Controller](modules_controller.md)
|
||||
- [Driver](modules_driver.md)
|
||||
- [Estimator](modules_estimator.md)
|
||||
- [Simulation](modules_simulation.md)
|
||||
- [System](modules_system.md)
|
||||
- [Template](modules_template.md)
|
||||
@@ -0,0 +1,36 @@
|
||||
# 模块参考:仿真
|
||||
|
||||
## simulator_sih
|
||||
|
||||
Source: [modules/simulation/simulator_sih](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/simulator_sih)
|
||||
|
||||
### 描述
|
||||
|
||||
This module provides a simulator for quadrotors and fixed-wings running fully
|
||||
inside the hardware autopilot.
|
||||
|
||||
This simulator subscribes to "actuator_outputs" which are the actuator pwm
|
||||
signals given by the control allocation module.
|
||||
|
||||
模拟器发布了被真实噪声污染的传感器信号以便在环路中加入状态估计器。
|
||||
|
||||
### 实现
|
||||
|
||||
模拟器运用矩阵代数方法实现了运动方程。
|
||||
姿态采用四元数表示。
|
||||
积分计算采用前向欧拉法。
|
||||
为避免堆栈溢出,大部分变量在 .hpp 文件中声明为全局变量。
|
||||
|
||||
<a id="simulator_sih_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
simulator_sih <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,62 @@
|
||||
# 模块参考: 模板
|
||||
|
||||
## 模块
|
||||
|
||||
Source: [templates/template_module](https://github.com/PX4/PX4-Autopilot/tree/main/src/templates/template_module)
|
||||
|
||||
### 描述
|
||||
|
||||
该部分描述所提供模块的功能。
|
||||
|
||||
这是一个模块的模版,该模块在后台作为任务(task)运行并且有 start/stop/status 功能。
|
||||
|
||||
### 实现
|
||||
|
||||
该部分描述模块的高层次实现。
|
||||
|
||||
### 示例
|
||||
|
||||
CLI usage example:
|
||||
|
||||
```
|
||||
module start -f -p 42
|
||||
```
|
||||
|
||||
<a id="module_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
module <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-f] Optional example flag
|
||||
[-p <val>] Optional example parameter
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## work_item_example
|
||||
|
||||
Source: [examples/work_item](https://github.com/PX4/PX4-Autopilot/tree/main/src/examples/work_item)
|
||||
|
||||
### 描述
|
||||
|
||||
Example of a simple module running out of a work queue.
|
||||
|
||||
<a id="work_item_example_usage"></a>
|
||||
|
||||
### 用法
|
||||
|
||||
```
|
||||
work_item_example <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
Reference in New Issue
Block a user