New Crowdin translations - zh-CN (#26148)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
PX4 Build Bot 2025-12-19 08:52:57 +11:00 committed by GitHub
parent c51502781f
commit ca6d257ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
66 changed files with 1027 additions and 722 deletions

View File

@ -1,41 +1,41 @@
- [Introduction](index.md)
- [概述](index.md)
- [基本概念](getting_started/px4_basic_concepts.md)
- [多旋翼](frames_multicopter/index.md)
- [Features](features_mc/index.md)
- [特征](features_mc/index.md)
- [飞行模式](flight_modes_mc/index.md)
- [位置模式(多旋翼)](flight_modes_mc/position.md)
- [Position Slow Mode (MC)](flight_modes_mc/position_slow.md)
- [低速的位置模式(多旋翼)](flight_modes_mc/position_slow.md)
- [高度模式(多旋翼)](flight_modes_mc/altitude.md)
- [Altitude Cruise Mode (MC)](flight_modes_mc/altitude_cruise.md)
- [Stabilized Mode (MC)](flight_modes_mc/manual_stabilized.md)
- [定高模式(多旋翼)](flight_modes_mc/altitude_cruise.md)
- [姿态稳定模式/新手模式(多旋翼)](flight_modes_mc/manual_stabilized.md)
- [特技模式(多旋翼)](flight_modes_mc/acro.md)
- [环绕模式(多旋翼)](flight_modes_mc/orbit.md)
- [Takeoff Mode (MC)](flight_modes_mc/takeoff.md)
- [Land Mode (MC)](flight_modes_mc/land.md)
- [Hold Mode (MC)](flight_modes_mc/hold.md)
- [Follow Me Mode (MC)](flight_modes_mc/follow_me.md)
- [Mission Mode (MC)](flight_modes_mc/mission.md)
- [Return Mode (MC)](flight_modes_mc/return.md)
- [Offboard Mode (MC)](flight_modes_mc/offboard.md)
- [Collision Prevention](computer_vision/collision_prevention.md)
- [自动起飞模式(多旋翼)](flight_modes_mc/takeoff.md)
- [自动降落模式(多旋翼)](flight_modes_mc/land.md)
- [定点模式(多旋翼)](flight_modes_mc/hold.md)
- [跟随模式(多旋翼)](flight_modes_mc/follow_me.md)
- [自主任务模式 (多旋翼)](flight_modes_mc/mission.md)
- [返航模式(多旋翼)](flight_modes_mc/return.md)
- [外部控制模式(多旋翼)](flight_modes_mc/offboard.md)
- [碰撞预防](computer_vision/collision_prevention.md)
- [地形跟随/保持](flying/terrain_following_holding.md)
- [Terrain Following/Holding](flying/terrain_following_holding.md)
- [Throw Launch](flight_modes_mc/throw_launch.md)
- [地形跟随/保持](flying/terrain_following_holding.md)
- [抛飞启动](flight_modes_mc/throw_launch.md)
- [Assembly](assembly/assembly_mc.md)
- [Configuration/Tuning](config_mc/index.md)
- [Auto-tune](config/autotune_mc.md)
- [Filter/Control Latency Tuning](config_mc/filter_tuning.md)
- [PID Tuning (Manual/Basic)](config_mc/pid_tuning_guide_multicopter_basic.md)
- [PID Tuning Guide (Manual/Advanced)](config_mc/pid_tuning_guide_multicopter.md)
- [Setpoint Tuning (Trajectory Generator)](config_mc/mc_trajectory_tuning.md)
- [Jerk-limited Type Trajectory](config_mc/mc_jerk_limited_type_trajectory.md)
- [Racer Setup](config_mc/racer_setup.md)
- [配置/调参](config_mc/index.md)
- [自动调优](config/autotune_mc.md)
- [滤波/控制延迟调整](config_mc/filter_tuning.md)
- [PID配置(手动/基本)](config_mc/pid_tuning_guide_multicopter_basic.md)
- [PID配置引导(手动/基本)](config_mc/pid_tuning_guide_multicopter.md)
- [定点配置 (轨迹生成)](config_mc/mc_trajectory_tuning.md)
- [限速型轨迹](config_mc/mc_jerk_limited_type_trajectory.md)
- [竞速设置](config_mc/racer_setup.md)
- [着陆探测器配置](advanced_config/land_detector.md)
- [静态压力生成](advanced_config/static_pressure_buildup.md)
- [Flying (Basics)](flying/basic_flying_mc.md)
- [飞行(基本)](flying/basic_flying_mc.md)
- [整机](complete_vehicles_mc/index.md)
- [ModalAI Starling](complete_vehicles_mc/modalai_starling.md)
- [多场景AI无人机——ModalAI Starling](complete_vehicles_mc/modalai_starling.md)
- [PX4 视觉套件](complete_vehicles_mc/px4_vision_kit.md)
- [MindRacer BNF & RTF](complete_vehicles_mc/mindracer_BNF_RTF.md)
- [MindRacer 210](complete_vehicles_mc/mindracer210.md)
@ -315,15 +315,17 @@
- [ADSB/FLARM (空中防撞)](config/actuators.md)
- [电调ESC校准](advanced_config/esc_calibration.md)
- [电调 & 电机](peripherals/esc_motors.md)
- [ESC Protocols](esc/esc_protocols.md)
- [PWM 电调和伺服系统](peripherals/pwm_escs_and_servo.md)
- [DShot 电调](peripherals/dshot.md)
- [OneShot 电调和伺服系统](peripherals/oneshot.md)
- [DroneCAN ESCs](dronecan/escs.md)
- [Zubax Telega](dronecan/zubax_telega.md)
- [PX4 Sapog ESC Firmware](dronecan/sapog.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq](peripherals/vertiq.md)
- [VESC](peripherals/vesc.md)
- [ARK 4IN1 ESC](esc/ark_4in1_esc.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq Motor/ESC Modules](peripherals/vertiq.md)
- [VESC Project ESCs](peripherals/vesc.md)
- [Zubax Telega ESCs](dronecan/zubax_telega.md)
- [Radio Control (RC)](getting_started/rc_transmitter_receiver.md)
- [无线电系统设置](config/radio.md)
@ -519,6 +521,7 @@
- [PPS Time Synchronization](advanced/pps_time_sync.md)
- [中间件](middleware/index.md)
- [uORB 通讯](middleware/uorb.md)
- [uORB Docs Standard](uorb/uorb_documentation.md)
- [uORB 图](middleware/uorb_graph.md)
- [uORB 消息参考](msg_docs/index.md)
- [Versioned](msg_docs/versioned_messages.md)

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,13 @@
# CAN
# CAN (DroneCAN & Cyphal)
[控制器局域网CAN](https://en.wikipedia.org/wiki/CAN_bus)是一种可靠的有线网络,它能让诸如飞行控制器、电调、传感器及其他外设等无人机组件相互通信。
它被设计为分布式架构,使用差分信号,即使在较长的电缆 (大型车辆上) 上也非常强大,避免单点故障。
[Controller Area Network (CAN)](https://en.wikipedia.org/wiki/CAN_bus) is a robust wired network that allows drone components such as flight controller, ESCs, sensors, and other peripherals, to communicate with each other.
It is particularly recommended on larger vehicles.
## 综述
CAN it is designed to be democratic and uses differential signaling.
For this reason it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
CAN 还允许来自外设的状态反馈,并通过总线方便的进行固件升级。
PX4 支持与 CAN 设备通信的两个软件协议:
@ -18,29 +24,36 @@ DroneCAN 和 Cyphal 都是早先一个叫做UAVCAN的项目。
这两项协议之间的差异在[Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814)中作了概述。
:::
:::warning
PX4不支持KDECAN等无人驾驶飞机的其他CAN软件协议(撰写时)。
:::
## 布线
CAN 网络的接线对于 DroneCAN 和 Cyphal/CAN 是一样 (实际上对所有的 CAN 网络都一样)。
设备以任意顺序连接成链。
Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port).
:::warning
Don't connect each CAN peripheral to a separate CAN port!
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy).
:::
在链的任一端,应该在两个数据线之间连接一个 120Ω 的终端电阻。
飞控和一些 GNSS 模块为了方便使用内置了终端电阻, 因此应该放在链的终端。
否则,你可以使用终端电阻,比如 [Zubax Robotics 的这款](https://shop.zubax.com/products/uavcan-micro-termination-plug?variant=6007985111069)。如果你有JST - GH压接工具也可以自己焊接一个。
下图显示了一个 CAN 总线连接飞控到 4 个 CAN 电调和一个 GNSS 的示例。
It includes a redundant bus connected to `CAN 2`.
![CAN 布线](../../assets/can/uavcan_wiring.svg)
图中未显示任何电源接线。
参考制造商的说明,确认组件是否需要单独供电,还是可以通过 CAN 总线供电。
:::info
For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax.com/public/cyphal/CyphalCAN-device-interconnection?pageId=2195476) (kb.zubax.com).
虽然本文是以 Cyphal 协议为基础编写的,但同样适用于 DroneCAN 硬件和任何其他 CAN 设置。
如需了解更复杂的场景,请参考 [论CAN总线拓扑结构与终端匹配](https://forum.opencyphal.org/t/on-can-bus-topology-and-termination/1685)。
:::
### 连接器
@ -54,7 +67,30 @@ Pixhawk标准兼容的 CAN 设备使用 4 引脚的 JST-GH 连接器为 CAN。
DroneCAN 和 Cyphal/CAN支持使用第二个(冗余) CAN 接口。
这是完全可选的,但会增加连接的强度。
所有Pixhawk飞行控制器都带有两个CAN接口 如果您的外围设备也支持 2 CAN 接口,建议您同时进行电线连接以提高安全。
Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
### Flight Controllers with Multiple CAN Ports
[Flight Controllers](../flight_controller/index.md) may have up to three independent CAN ports, such as `CAN1`, `CAN2`, `CAN3` (neither DroneCAN or Cyphal support more than three).
Note that you can't have both DroneCAN and Cyphal running on PX4 at the same time.
:::tip
You only _need_ one CAN port to support an arbitrary number of CAN devices using a particular CAN protocol.
Don't connect each CAN peripheral to a separate CAN port!
:::
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy).
If three are three ports, you might use the remaining network for devices that support another CAN protocol.
The documentation for your flight controller should indicate which ports are supported/enabled.
At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console):
```sh
uavcan status
```
Note that you can also check the number of supported CAN interfaces for a board by searching for `CONFIG_BOARD_UAVCAN_INTERFACES` in its [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#) configuration file.
## 固件

View File

@ -53,7 +53,7 @@ It is pre-installed with PX4 v1.15.4 at time of writing (a more recent version m
| 处理器 | FMU: STM32H743; IO Processor: STM32F103 |
| Accelerometer | BMI055/ICM-42688-P |
| Gyroscope | BMI055/ICM-42688-P |
| 磁罗盘 | IST8310 |
| 磁力计 | IST8310 |
| Barometer | MS5611 |
| 重量 | 59.3g |
| 尺寸 | Length 84.8mm × Width 44mm × Height 12.4mm |

View File

@ -133,11 +133,11 @@ $$
| Symbol | 描述 | Unit |
| ----------------------------------- | ---------------------------------- | ---- |
| $\vec{a}$ | Vector from current to previous WP | m |
| $\vec{b}$ | Vector from current to next WP | m |
| $r_{min}$ | Minimum turn radius | m |
| $\delta_{max}$ | Maximum steer angle | m |
| $r_{acc}$ | Acceptance radius | m |
| $\vec{a}$ | Vector from current to previous WP | |
| $\vec{b}$ | Vector from current to next WP | |
| $r_{min}$ | Minimum turn radius | |
| $\delta_{max}$ | Maximum steer angle | |
| $r_{acc}$ | Acceptance radius | |
## Differential Rover Only
@ -187,14 +187,14 @@ The position controller uses the following structure:
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ---- |
| <a id="RO_SPEED_RED"></a>[RO_SPEED_RED](../advanced_config/parameter_reference.md#RO_SPEED_RED) | (Optional) Tuning parameter for the speed reduction based on the course error | - |
| <a id="PP_LOOKAHD_GAIN"></a>[PP_LOOKAHD_GAIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_GAIN) | Pure pursuit: Main tuning parameter | - |
| <a id="PP_LOOKAHD_MAX"></a>[PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | m |
| <a id="PP_LOOKAHD_MIN"></a>[PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | m |
| <a id="PP_LOOKAHD_MAX"></a>[PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | |
| <a id="PP_LOOKAHD_MIN"></a>[PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | |
## Ackermann Specific
| 参数 | 描述 | Unit |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---- |
| <a id="RA_ACC_RAD_MAX"></a>[RA_ACC_RAD_MAX](../advanced_config/parameter_reference.md#RA_ACC_RAD_MAX) | (Optional) Maximum radius the acceptance radius can be scaled to | m |
| <a id="RA_ACC_RAD_MAX"></a>[RA_ACC_RAD_MAX](../advanced_config/parameter_reference.md#RA_ACC_RAD_MAX) | (Optional) Maximum radius the acceptance radius can be scaled to | |
| <a id="RA_ACC_RAD_GAIN"></a>[RA_ACC_RAD_GAIN](../advanced_config/parameter_reference.md#RA_ACC_RAD_GAIN) | (Optional) Tuning parameter for the acceptance radius scaling | - |
## Differential Specific

View File

@ -129,5 +129,5 @@ Both these setpoint are then sent to their own closed loop speed controllers.
| 参数 | 描述 | Unit |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ---- |
| <a id="PP_LOOKAHD_GAIN"></a>[PP_LOOKAHD_GAIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_GAIN) | Pure pursuit: Main tuning parameter | - |
| <a id="PP_LOOKAHD_MAX"></a>[PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | m |
| <a id="PP_LOOKAHD_MIN"></a>[PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | m |
| <a id="PP_LOOKAHD_MAX"></a>[PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | |
| <a id="PP_LOOKAHD_MIN"></a>[PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | |

View File

@ -2,12 +2,12 @@
无论对于模拟器还是硬件目标设备PX4固件可以在控制台或者IDE中从源码构建
You need to build PX4 in order to use [simulators](../simulation/index.md), or if you want to modify PX4 and create a custom build.
若要使用[模拟器](../simulation/index.md)或需要修改PX4并创建自定义构建则必须自行构建PX4。
如果您只想在实际硬件上试试 PX4那么可以使用 QGroundControl[烧录预构建的二进制文件](../config/firmware.md)(无需跟着下面的指导)。
:::info
在跟着这些指导之前,你必须先为主机操作系统和目标硬件安装 [开发者工具链](../dev_setup/dev_env.md)。
如果您在跟着这些步骤操作后有任何问题,请参阅下面的 [Troubleshooting](#troubleshooting)。
如果您在跟着这些步骤操作后有任何问题,请参阅下面的 [故障排除](#troubleshooting)。
:::
## 下载 PX4 源代码
@ -20,12 +20,12 @@ PX4 源代码存储在 Github 上的 [PX4/PX4-Autopilot](https://github.com/PX4/
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
```
Note that you may already have done this when installing the [Developer Toolchain](../dev_setup/dev_env.md)
注意,您可能在[安装开发工具链](../dev_setup/dev_env.md)时已经完成了这项操作
:::info
This is all you need to do in order to get the latest code.
If needed you can also [get the source code specific to a particular release](../contribute/git_examples.md#get-a-specific-release).
[GIT Examples](../contribute/git_examples.md) provides a lot more information working with releases and contributing to PX4.
你只需要执行它就能够得到最新的代码。
如果需要,您也可以[获取特定版本的源代码](../contribute/git_examples.md#get-a-specific-release)。
[[GIT 示例](../contribute/git_examples.md) 提供了更多的信息,用于发布版本并对 PX4 作出贡献。
:::
## 初次构建(使用模拟器)
@ -33,15 +33,15 @@ If needed you can also [get the source code specific to a particular release](..
首先我们要用控制台环境来构建一个模拟器目标
这使我们能够在转移到真正的硬件和 IDE 之前验证系统设置。
Navigate into the **PX4-Autopilot** directory and start [Gazebo SITL](../sim_gazebo_gz/index.md) using the following command:
导航到 **PX4-Autopilot** 目录并使用以下命令启动 [Gazebo SITL](../sim_gazebo_gz/index.md)
```sh
make px4_sitl gz_x500
```
:::details
If you installed Gazebo Classic
Start [Gazebo Classic SITL](../sim_gazebo_classic/index.md) using the following command:
如果您安装的是 Gazebo Classic
使用以下命令启动 [Gazebo SITL](../sim_gazebo_classic/index.md)
```sh
make px4_sitl gazebo-classic
@ -51,11 +51,11 @@ make px4_sitl gazebo-classic
这将显示 PX4 控制台:
![PX4 Console](../../assets/toolchain/console_gazebo.png)
![PX4 控制台](../../assets/toolchain/console_gazebo.png)
:::info
You may need to start _QGroundControl_ before proceeding, as the default PX4 configuration requires a ground control connection before takeoff.
This can be [downloaded from here](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html).
您可能需要在继续之前启动 _QGroundControl_ ,因为默认的 PX4 配置需要在起飞前进行地面控制连接。
可以[从这里下载](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html)
:::
可以通过键入以下命令(如上方控制台中所示)来控制飞行器。
@ -64,11 +64,11 @@ This can be [downloaded from here](https://docs.qgroundcontrol.com/master/en/qgc
pxh> commander takeoff
```
The vehicle will take off and you'll see this in the Gazebo simulator UI:
该载具将起飞,您将在 Gazebo simulator UI 中看到:
![Gazebo UI with vehicle taking off](../../assets/toolchain/gazebo_takeoff.png)
![Gazebo UI 载具起飞](../../assets/toolchain/gazebo_takeoff.png)
The drone can be landed by typing `commander land` and the whole simulation can be stopped by doing **CTRL+C** (or by entering `shutdown`).
无人机可以通过输入 `Commander land` 来着陆,整个模拟可以通过 **CTRL+C** (或输入 `shutdown` )来停止。
与地面站一起飞模拟器更接近飞机的实际运行。
在飞机飞行时Takeoff飞行模式单击地图上的某个位置并启用滑块。
@ -80,9 +80,9 @@ The drone can be landed by typing `commander land` and the whole simulation can
### 为NuttX构建
To build for NuttX- or Pixhawk- based boards, navigate into the **PX4-Autopilot** directory and then call `make` with the build target for your board.
若要构建基于NuttX-或 Pixhawk的飞控板请导航到 **PX4-Autopilot** 目录,然后调用 `make` ,并为您的板调用构建目标。
For example, to build for [Pixhawk 4](../flight_controller/pixhawk4.md) hardware you could use the following command:
例如,要为 [Pixhawk 4](../flight_controller/pixhawk4.md) 硬件构建,可使用以下命令:
```sh
cd PX4-Autopilot
@ -96,15 +96,15 @@ make px4_fmu-v5_default
[954/954] Creating /home/youruser/src/PX4-Autopilot/build/px4_fmu-v4_default/px4_fmu-v4_default.px4
```
The first part of the build target `px4_fmu-v4` indicates the target flight controller hardware for the firmware.
The suffix, in this case `_default`, indicates a firmware _configuration_, such as supporting or omitting particular features.
构建目标 `px4_fmu-v4` 的第一部分表示目标飞行控制器固件的硬件。
后缀(此处为`_default`表示固件的_配置_例如支持或省略特定功能。
:::info
The `_default` suffix is optional.
For example, `make px4_fmu-v5` and `px4_fmu-v5_default` result in the same firmware.
`_default` 后缀是可选的。
例如,`make px4_fmu-v5``px4_fmu-v5_default` 都会生成相同的固件。
:::
The following list shows the build commands for the [Pixhawk standard](../flight_controller/autopilot_pixhawk_standard.md) boards:
以下列表显示了[Pixhawk标准](../flight_controller/autopilot_pixhawk_standard.md)飞行控制板的构建命令:
- [Holybro Pixhawk 6X-RT (FMUv6X)](../flight_controller/pixhawk6x-rt.md): `make px4_fmu-v6xrt_default`
@ -134,7 +134,7 @@ The following list shows the build commands for the [Pixhawk standard](../flight
- [Pixhawk 2 (Cube Black) (FMUv3)](../flight_controller/pixhawk-2.md): `make px4_fmu-v3_default`
- [mRo Pixhawk (FMUv3)](../flight_controller/mro_pixhawk.md): `make px4_fmu-v3_default` (supports 2MB Flash)
- [mRo Pixhawk (FMUv3)](../flight_controller/mro_pixhawk.md): `make px4_fmu-v3_default` (支持 2MB Flash)
- [Holybro pix32 (FMUv2)](../flight_controller/holybro_pix32.md): `make px4_fmu-v2_default`
@ -145,17 +145,17 @@ The following list shows the build commands for the [Pixhawk standard](../flight
- [Pixhawk 1 (FMUv2)](../flight_controller/pixhawk.md): `make px4_fmu-v2_default`
:::warning
You **must** use a supported version of GCC to build this board (e.g. the same as used by [CI/docker](../test_and_ci/docker.md)) or remove modules from the build. Building with an unsupported GCC may fail, as PX4 is close to the board's 1MB flash limit.
您**必须**使用受支持的GCC版本来构建此开发板例如与[CI/docker](../test_and_ci/docker.md)中使用的相同版本),否则需从构建中移除相关模块。 Building with an unsupported GCC may fail, as PX4 is close to the board's 1MB flash limit.
:::
- Pixhawk 1 with 2 MB flash: `make px4_fmu-v3_default`
- 具有 2 MB flash 的 Pixhawk 1: `make px4_fmu-v3_default`
Build commands for non-Pixhawk NuttX fight controllers (and for all other-boards) are provided in the documentation for the individual [flight controller boards](../flight_controller/index.md).
非 Pixhawk NuttX 飞控的构建命令(以及所有其他主板的命令)均在各款[飞控主板](../flight_controller/index.md)的文档中提供。
### 将固件烧录到飞控板
Append `upload` to the make commands to upload the compiled binary to the autopilot hardware via USB.
在 make 命令后添加 `upload`通过USB将编译后的二进制文件上传至 autopilot 硬件。
例如
```sh
@ -174,13 +174,13 @@ Rebooting.
```
:::tip
This is not supported when developing on WSL2.
See [ Windows Development Environment (WSL2-Based) > Flash a Control Board](../dev_setup/dev_env_windows_wsl.md#flash-a-flight-control-board).
在 WSL 2 上开发时不支持此操作。(其实也有办法,见 [WSL 2 连接 USB 设备](https://learn.microsoft.com/zh-cn/windows/wsl/connect-usb))。
参见[ Windows 开发环境 (WSL2-基于) > Flash控制板](../dev_setup/dev_env_windows_wsl.md#flash-a-flight-control-board)。
:::
## 其他飞控板
Build commands for other boards are given the [board-specific flight controller pages](../flight_controller/index.md) (usually under a heading _Building Firmware_).
其他主板的构建命令详见[各主板专属飞行控制器页面](../flight_controller/index.md)通常位于_构建固件_标题下
您还可以使用以下命令列出所有配置目标:
@ -190,15 +190,15 @@ make list_config_targets
## 用图形界面 IDE 编译
[VSCode](../dev_setup/vscode.md) is the officially supported (and recommended) IDE for PX4 development.
It is easy to set up and can be used to compile PX4 for both simulation and hardware environments.
[VSCode](../dev_setup/vscode.md是官方支持 (且推荐) 的 用于 PX4 开发的 IDE。
它很容易设置,可以用于编译模拟和硬件环境的 PX4。
## 故障处理
### 常规构建错误
许多构建问题是由不匹配的子模块或未完全清理的构建环境引起的。
Updating the submodules and doing a `distclean` can fix these kinds of errors:
更新子模块并进行 `distclean` 可以修复这些类型的错误:
```sh
git submodule update --recursive
@ -207,11 +207,11 @@ make distclean
### 闪存溢出了 XXX 字节
The `region 'flash' overflowed by XXXX bytes` error indicates that the firmware is too large for the target hardware platform.
This is common for `make px4_fmu-v2_default` builds, where the flash size is limited to 1MB.
`region 'flash' overflowed by XXXX bytes` 错误表明固件对目标硬件平台太大了。
这对于`make px4_fmu-v2_default` 构建是常见的,它的 flash 大小被限制在 1MB。
If you're building the _vanilla_ master branch, the most likely cause is using an unsupported version of GCC.
In this case, install the version specified in the [Developer Toolchain](../dev_setup/dev_env.md) instructions.
如果您正在构建_vanilla_master 分支,最可能的原因是使用不支持的 GCC版本。
在这种情况下,安装[开发者工具链](../dev_setup/dev_env.md)说明中指定的版本。
如果在构建自己的分支您可能已将固件大小增加到超过1MB的限制。
在这种情况下,您需要从构建中删除您不需要的任何驱动程序/模块。
@ -221,16 +221,16 @@ In this case, install the version specified in the [Developer Toolchain](../dev_
MacOS 默认允许在所有正在运行的进程中最多打开256个文件。
PX4构建系统打开大量文件因此您可能会超出此数量。
The build toolchain will then report `Too many open files` for many files, as shown below:
构建工具链为很多文件报 `Too many open files`,如下所示:
```sh
/usr/local/Cellar/gcc-arm-none-eabi/20171218/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: cannot find NuttX/nuttx/fs/libfs.a: Too many open files
```
解决方案是增加允许打开文件的最大数量例如增加到300
You can do this in the macOS _Terminal_ for each session:
您可以在每个会话的 macOS _终端_ 中这样做:
- Run this script [Tools/mac_set_ulimit.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/mac_set_ulimit.sh), or
- 运行此脚本 [Tools/mac_set_ulimit.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/mac_set_ulimit.sh),或
- 运行这个命令:
```sh
@ -239,7 +239,7 @@ You can do this in the macOS _Terminal_ for each session:
### macOS Catalina运行cmake时出现问题
As of macOS Catalina 10.15.1 there may be problems when trying to build the simulator with _cmake_.
对于 macOS Catalina 10.15.1 ,在尝试使用 _cmake _ 构建模拟器时可能会遇到问题。
如果您在这个平台上遇到构建问题,请尝试在终端中运行以下命令:
```sh
@ -249,7 +249,7 @@ sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /us
### Ubuntu 18.04涉及arm_none_eabi_gcc的编译错误
Build issues related to `arm_none_eabi_gcc`may be due to a broken g++ toolchain installation.
与 arm_none_eabi_gcc 相关的构建问题可能是由于损坏的g++工具链安装引起的。
您可以通过检查缺少的依赖项来验证这一点:
```sh
@ -266,15 +266,15 @@ arm-none-eabi-gdb --version
arm-none-eabi-gdb: command not found
```
This can be resolved by removing and [reinstalling the compiler](https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa).
这个问题可以通过删除和[重新安装编译器](https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa)来解决。
### Ubuntu 18.04Visual Studio Code 无法监视此大型工作区中的文件更改
See [Visual Studio Code IDE (VSCode) > Troubleshooting](../dev_setup/vscode.md#troubleshooting).
请参阅[Visual Studio 代码 IDE (VSCode) > 疑难解答](../dev_setup/vscode.md#troubleshooting)。
### 导入Python软件包失败
"Failed to import" errors when running the `make px4_sitl jmavsim` command indicates that some Python packages are not installed (where expected).
在运行 `make px4_sitl jmavsim` 命令时“导入失败”错误表示某些Python 软件包未安装(如预期般安装)。
```sh
Failed to import jinja2: No module named 'jinja2'
@ -292,25 +292,25 @@ pip3 install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg
## PX4 创建生成目标
The previous sections showed how you can call _make_ to build a number of different targets, start simulators, use IDEs etc.
前面的章节显示了您如何调用 _make_ 来构建一些不同的目标,启动模拟器,使用 IDE 等。
This section shows how _make_ options are constructed and how to find the available choices.
The full syntax to call _make_ with a particular configuration and initialization file is:
使用特定配置和初始化文件调用 _make_ 的完整语法是:
```sh
make [VENDOR_][MODEL][_VARIANT] [VIEWER_MODEL_DEBUGGER_WORLD]
```
**VENDOR_MODEL_VARIANT**: (also known as `CONFIGURATION_TARGET`)
**VENDOR_MODEL_VARIANT**: (也称为`CONFIGURATION_TARGET`)
- **VENDOR:** The manufacturer of the board: `px4`, `aerotenna`, `airmind`, `atlflight`, `auav`, `beaglebone`, `intel`, `nxp`, etc.
The vendor name for Pixhawk series boards is `px4`.
- **MODEL:** The _board model_ "model": `sitl`, `fmu-v2`, `fmu-v3`, `fmu-v4`, `fmu-v5`, `navio2`, etc.
- **VARIANT:** Indicates particular configurations: e.g. `bootloader`, `cyphal`, which contain components that are not present in the `default` configuration.
Most commonly this is `default`, and may be omitted.
- \*\*VENDOR\*\*主板制造商:`px4``aerotenna``airmind``atlflight``auav``beaglebone``intel``nxp` 等。
Pixhawk 系列主板的供应商名称为 `px4`
- \*\*MODEL\*\*飞控板型号 “model”`sitl``fmu-v2``fmu-v3``fmu-v4``fmu-v5``navio2` 等。
- **VARIANT:** 指示特定的配置:例如`bootloader`, `cyphal`, 其中包含不存在于“默认”配置中的组件。
最常见的情况是 `default`, 并且可能被省略。
:::tip
You can get a list of _all_ available `CONFIGURATION_TARGET` options using the command below:
您可以使用下面的命令获取一个可用的`CONFIGURATION_TARGET`选项列表:
```sh
make list_config_targets
@ -318,29 +318,29 @@ make list_config_targets
:::
**VIEWER_MODEL_DEBUGGER_WORLD:**
**VIEWER_MODEL_DEBUGER_WORLD:**
- **VIEWER:** This is the simulator ("viewer") to launch and connect: `gz`, `gazebo`, `jmavsim`, `none` <!-- , ?airsim -->
- **VIEWER:** 这是启动和连接的模拟器 ("查看器") : `gz`, `gzebo`, `jmavsim`, `none` <!-- , ?airsim -->
:::tip
`none` can be used if you want to launch PX4 and wait for a simulator (jmavsim, Gazebo, Gazebo Classic, or some other simulator).
For example, `make px4_sitl none_iris` launches PX4 without a simulator (but with the iris airframe).
`none` 可以用于启动PX4并等待模拟器(jmavsim, Gazebo, Gazebo Classic, 或其他模拟器)。
例如,`make px4_sitl none_iris` 在没有模拟器的情况下启动 PX4 (但使用 iris 机架)。
:::
- **MODEL:** The _vehicle_ model to use (e.g. `iris` (_default_), `rover`, `tailsitter`, etc), which will be loaded by the simulator.
The environment variable `PX4_SIM_MODEL` will be set to the selected model, which is then used in the [startup script](../simulation/index.md#startup-scripts) to select appropriate parameters.
- MODEL:要使用的 载具 模型(例如 iris (default)、rover、tailsitter 等),该模型将由模拟器加载。
环境变量 `PX4_SIM_MODEL` 将被设置为选中的模型,然后在[启动脚本](../simulation/index.md#startup-scripts)中使用以选择适当的参数。
- **DEBUGGER:** Debugger to use: `none` (_default_), `ide`, `gdb`, `lldb`, `ddd`, `valgrind`, `callgrind`.
For more information see [Simulation Debugging](../debug/simulation_debugging.md).
- **DEBUGER:** 调试器使用: `none` (_default_), `ide`, `gdb`, `lldb`, `ddd`, `valgrind`, `callgrind`.
更多信息请参阅[模拟调试](../debug/simulation_debugging.md)。
- **WORLD:** (Gazebo Classic only).
Set the world ([PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds](https://github.com/PX4/PX4-SITL_gazebo-classic/tree/main/worlds)) that is loaded.
Default is [empty.world](https://github.com/PX4/PX4-SITL_gazebo-classic/blob/main/worlds/empty.world).
For more information see [Gazebo Classic > Loading a Specific World](../sim_gazebo_classic/index.md#loading-a-specific-world).
- **WORLD**: (仅限Gazebo Classic).
设置加载的世界([PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds](https://github.com/PX4/PX4-SITL_gazebo-classic/tree/main/worlds))。
默认为 [empty.world](https://github.com/PX4/PX4-SITL_gazebo-classic/blob/main/worlds/empty.world)
欲了解更多信息,请参阅[Gazebo Classic > 加载特定世界](../sim_gazebo_classic/index.md#loading-a-specific-world)。
:::tip
You can get a list of _all_ available `VIEWER_MODEL_DEBUGGER_WORLD` options using the command below:
您可以使用下面的命令获取_所有_可用的选项 `VIEWER_MODEBUGER_WORLD`
```sh
make px4_sitl list_vmd_make_targets
@ -350,33 +350,33 @@ make px4_sitl list_vmd_make_targets
::: info
- Most of the values in the `CONFIGURATION_TARGET` and `VIEWER_MODEL_DEBUGGER` have defaults, and are hence optional.
For example, `gazebo-classic` is equivalent to `gazebo-classic_iris` or `gazebo-classic_iris_none`.
- `CONFIGURATION_TARGET``VIEWER_MODEBUGER`中的大多数值都有默认值,因此是可选的。
例如,`gazebo-classic`等于`gazebo-classic_iris``gazebo-classic_iris_none`
- 如果要在其他两个设置之间指定默认值,可以使用三个下划线。
For example, `gazebo-classic___gdb` is equivalent to `gazebo-classic_iris_gdb`.
- You can use a `none` value for `VIEWER_MODEL_DEBUGGER` to start PX4 and wait for a simulator.
For example start PX4 using `make px4_sitl_default none` and jMAVSim using `./Tools/simulation/jmavsim/jmavsim_run.sh -l`.
例如,`gazebo-classic___gdb`相当于`gazebo-classic_iris_gdb`
- 你可以使用 "none" 值为 "VIEWER_MODEBUGER" 来启动 PX4 并等待模拟器。
例如,使用 `make px4_sitl_default none` 和 jMAVSim 使用 `./Tools/simulation/jmavsim/jmavsim_run.sh -l` 启动 PX4。
:::
The `VENDOR_MODEL_VARIANT` options map to particular _px4board_ configuration files in the PX4 source tree under the [/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards) directory.
Specifically `VENDOR_MODEL_VARIANT` maps to a configuration file **boards/VENDOR/MODEL/VARIANT.px4board**
(e.g. `px4_fmu-v5_default` corresponds to [boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board)).
`VENDOR_MODEL_VARIANT`选项映射为 [/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards) 目录下的 PX4 源树中的特殊_px4board_ 配置文件。
具体而言,`VENDOR_MODEL_VARIANT` 映射到配置文件 **boards/VENDOR/MODEL/VARIANT.px4board**
(例如 `px4_fmu-v5_default` 对应 [boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board))。
其他 make 目标在相关章节中讨论:
- `bloaty_compare_master`: [Binary Size Profiling](../debug/binary_size_profiling.md)
- `bloaty_compare_master`[二进制大小分析](../debug/binary_size_profiling.md)
- ...
## Firmware Version & Git Tags
## 固件版本和 Git 标签
The _PX4 Firmware Version_ and _Custom Firmware Version_ are published using the MAVLink [AUTOPILOT_VERSION](https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION) message, and displayed in the _QGroundControl_ **Setup > Summary** airframe panel:
_PX4固件版本_和_自定义固件版本_通过 MAVLink [AUTOPILOT_VERSION](https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION)消息发布并在_QGroundControl_的**设置 > 摘要**机身面板中显示:
![Firmware info](../../assets/gcs/qgc_setup_summary_airframe_firmware.jpg)
![固件信息](../../assets/gcs/qgc_setup_summary_airframe_firmware.jpg)
These are extracted at build time from the active _git tag_ for your repo tree.
The git tag should be formatted as `<PX4-version>-<vendor-version>` (e.g. the tag in the image above was set to `v1.8.1-2.22.1`).
这些是在构建时从您仓库树的活动_gi tag_中提取的。
git 标签应该格式化为 `<PX4-version>-<vendor-version>` (例如上面图像中的标签被设置为 `v1.8.1-2.22.1`)。
:::warning
If you use a different git tag format, versions information may not be displayed properly.
如果您使用不同的 git 标签格式,可能无法正确显示版本信息。
:::

View File

@ -1,4 +1,4 @@
# Initial Setup & Configuration
# 初始配置
我们建议开发者们获取下文描述的基本配置的硬件设备(或者相似的设备)并使用"默认" <a href="../airframes/airframe_reference.md">机架</a> 构型。

View File

@ -24,5 +24,5 @@
- [支持](../contribute/support.md):使用 [讨论板](https://discuss.px4.io//) 和其他支持渠道获得帮助。
- [每周开发者电话会议](../contribute/dev_call.md):这是一个很好的机会来会见 PX4 开发团队,讨论平台技术细节(包括pull requests 主要问题,一般性问答)。
- [Licences](../contribute/licenses.md): What you can do with the code (free to use and modify under terms of the permissive [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause)!)
- [Licences](../contribute/licenses.md): 您对代码的操作权限(可在宽松的 [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause)条款下自由使用和修改!)
- [贡献](../contribute/index.md): 如何使用我们的 [源代码](../contribute/code.md)。

View File

@ -94,6 +94,7 @@ Set the following parameters in _QGroundControl_:
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.

View File

@ -91,6 +91,7 @@ Set the following parameters in _QGroundControl_:
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.

View File

@ -0,0 +1,65 @@
# ARK 4IN1 ESC (with/without Connectors)
4 in 1 Electronic Speed Controller (ESC) that is made in the USA, NDAA compliant, and DIU Blue Framework listed.
The ESC comes in variants without connectors that you can solder in place, and a variant that has built-in motor and battery connectors (no soldering required).
![ARK 4IN1 ESC without connectors ](../../assets/hardware/esc/ark/ark_4_in_1_esc.jpg)![ARK 4IN1 ESC with connectors](../../assets/hardware/esc/ark/ark_4_in_1_esc_with_connectors.jpg)
## 购买渠道
Order this module from:
- [4IN1 ESC (with connectors)](https://arkelectron.com/product/ark-4in1-esc/) (ARK Electronics - US)
- [ARK Electronics (without connectors)](https://arkelectron.com/product/ark-4in1-esc-cons/) (ARK Electronics US)
## Hardware Specifications
- Battery Voltage: 3-8s
- 6V Minimum
- 65V Absolute Maximum
- Current Rating: 50A Continuous, 75A Burst Per Motor
- [STM32F0](https://www.st.com/en/microcontrollers-microprocessors/stm32f0-series.html)
- [AM32 Firmware](https://github.com/am32-firmware/AM32/pull/27)
- Onboard Current Sensor, Serial Telemetry
- 100V/A
- Input Protocols
- DShot (300, 600)
- Bi-directional DShot
- KISS Serial Telemetry
- PWM
- 8 Pin JST-SH Input/Output
- 10 Pin JST-SH Debug
- Motor & Battery Connectors (with-connector version)
- MR30 Connector Limit Per Motor: 30A Continuous, 40A Burst
- Four MR30 Motor Connectors
- Dimensions (with connectors)
- Size: 77.00mm x 42.00mm x 9.43mm
- Mounting Pattern: 30.5mm
- Weight: 24g
- Dimensions (without connectors)
- Size: 43.00mm x 40.50mm x 7.60mm
- Mounting Pattern: 30.5mm
- Weight: 14.5g
Other
- Made in the USA
- Open source AM32 firmware
- [DIU Blue Framework Listed](https://www.diu.mil/blue-uas/framework)
## 另见
- [ARK 4IN1 ESC CONS](https://docs.arkelectron.com/electronic-speed-controller/ark-4in1-esc) (ARK Docs)

View File

@ -0,0 +1,66 @@
# ESC Protocols
This topic lists the main [Electronic Speed Controller (ESC)](../peripherals/esc_motors.md) protocols supported by PX4.
## DShot
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduced latency, in particular racing multicopters, VTOL vehicles, and so on.
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can reverse motor spin directions.
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
Selecting a higher rate DShot ESC in the UI results in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
## DroneCAN
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
The PX4 implementation is currently limited to update rates of 200 Hz.
DroneCAN shares many similar benefits to [DShot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
## PWM
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired speed.
The pulse width typically ranges between 1000 μs for zero power and 2000 μs for full power.
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50 Hz and 490 Hz (the theoretical maximum being 500 Hz for a very small "off" cycle).
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
For PWM servos 50 Hz is usually sufficient, and many don't support higher rates.
![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png)
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the pulse widths representing low and high values can vary significantly.
Unlike [DShot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
## OneShot 125
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
There are a number of variants of the OneShot protocol, which support different rates.
PX4 only supports OneShot 125.
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125 μs to 250 μs for zero to full power).
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
The actual supported rate depends on the ESC used.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)

View File

@ -80,7 +80,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
| ------- | --------- | ------ | ---------- |
| SERIAL1 | Telem1 | UART7 | /dev/ttyS6 |
| SERIAL2 | Telem2 | UART5 | /dev/ttyS4 |
| SERIAL3 | GPS1 | USART1 | UART |
| SERIAL3 | GPS1 | USART1 | /dev/ttyS0 |
| SERIAL4 | GPS2 | UART8 | /dev/ttyS7 |
| SERIAL5 | Telem3 | USART2 | /dev/ttyS1 |
| SERIAL6 | UART4 | UART4 | /dev/ttyS3 |

View File

@ -63,7 +63,7 @@ For pinout of the ARKV6X see the [DS-10 Pixhawk Autopilot Bus Standard](https://
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 & I2C |

View File

@ -84,7 +84,7 @@ As a CC-BY-SA 3.0 licensed Open Hardware design, all schematics and design files
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | IO debug |
| UART | /dev/ttyS0 | IO debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -124,7 +124,7 @@ The [Pixhawk V6X Wiring Quick Start](../assembly/quick_start_cuav_pixhawk_v6x.md
| UART | 设备 | Port |
| ------ | ---------- | -------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 |

View File

@ -122,7 +122,7 @@ The pinout is as shown.
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------------------------- |
| UART | UART | GPS |
| UART | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | TELEM4 |

View File

@ -134,7 +134,7 @@ For more information see [Using JTAG for hardware debugging](#using-jtag-for-har
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------------------------- |
| UART | UART | GPS |
| UART | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | TELEM4 |

View File

@ -160,7 +160,7 @@ For more information see [Using JTAG for hardware debugging](#using-jtag-for-har
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------------------------- |
| UART | UART | GPS |
| UART | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | TELEM4 |

View File

@ -101,7 +101,7 @@ Order from [CUAV](https://store.cuav.net/).
| UART | 设备 | Port |
| ------ | ---------- | ------ |
| USART1 | UART | GPS1 |
| USART1 | /dev/ttyS0 | GPS1 |
| USART2 | /dev/ttyS1 | GPS2 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 |

View File

@ -206,7 +206,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| USART2 | UART | TELEM1 (流控) |
| USART2 | /dev/ttyS0 | TELEM1 (流控) |
| USART3 | /dev/ttyS1 | TELEM2 (流控) |
| UART4 | /dev/ttyS2 | GPS1 |
| USART6 | /dev/ttyS3 | PX4IO |

View File

@ -207,7 +207,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| USART2 | UART | TELEM1 (流控) |
| USART2 | /dev/ttyS0 | TELEM1 (流控) |
| USART3 | /dev/ttyS1 | TELEM2 (流控) |
| UART4 | /dev/ttyS2 | GPS1 |
| USART6 | /dev/ttyS3 | PX4IO |

View File

@ -100,7 +100,7 @@ Board schematics and other documentation can be found here: [The Cube Project](h
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| USART2 | UART | TELEM1 (流控) |
| USART2 | /dev/ttyS0 | TELEM1 (流控) |
| USART3 | /dev/ttyS1 | TELEM2 (流控) |
| UART4 | /dev/ttyS2 | GPS1 |
| USART6 | /dev/ttyS3 | PX4IO |

View File

@ -170,7 +170,7 @@ make holybro_durandal-v1_default
| UART | 设备 | Port |
| ------ | ---------- | ----------- |
| USART1 | UART | GPS1 |
| USART1 | /dev/ttyS0 | GPS1 |
| USART2 | /dev/ttyS1 | TELEM1 |
| USART3 | /dev/ttyS2 | TELEM2 |
| UART4 | /dev/ttyS3 | TELEM4/GPS2 |

View File

@ -96,7 +96,7 @@ As a CC-BY-SA 3.0 licensed Open Hardware design, all schematics and design files
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | IO debug |
| UART | /dev/ttyS0 | IO debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -106,7 +106,7 @@ Order from [Holybro](https://holybro.com/products/pix32-v6).
| UART | 设备 | Port |
| ------ | ---------- | ------ |
| USART1 | UART | GPS1 |
| USART1 | /dev/ttyS0 | GPS1 |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART5 | /dev/ttyS3 | TELEM2 |

View File

@ -113,7 +113,7 @@ In addition to the [basic configuration](../config/index.md), the following para
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------- |
| USART1 | UART | TELEM1 |
| USART1 | /dev/ttyS0 | TELEM1 |
| USART2 | /dev/ttyS1 | TELEM2 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -69,7 +69,7 @@ Firmware can be manually installed in any of the normal ways:
| UART | 设备 | Port | Default function |
| ------ | ---------- | --------------------------- | ---------------- |
| USART1 | UART | GPS 1 | GPS1 |
| USART1 | /dev/ttyS0 | GPS 1 | GPS1 |
| USART2 | /dev/ttyS1 | R2, T2 | GPS2 |
| USART3 | /dev/ttyS2 | R3, T3 | TELEM1 |
| UART5 | /dev/ttyS3 | R5, T5 | TELEM2 |

View File

@ -117,7 +117,7 @@ In addition to the [basic configuration](../config/index.md), the following para
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------- |
| USART1 | UART | TELEM1 |
| USART1 | /dev/ttyS0 | TELEM1 |
| USART2 | /dev/ttyS1 | TELEM2 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -124,7 +124,7 @@ In addition to the [basic configuration](../config/index.md), the following para
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------- |
| USART1 | UART | TELEM1 |
| USART1 | /dev/ttyS0 | TELEM1 |
| UART2 | /dev/ttyS1 | TELEM2 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -121,7 +121,7 @@ In addition to the [basic configuration](../config/index.md), the following para
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------- |
| USART1 | UART | TELEM1 |
| USART1 | /dev/ttyS0 | TELEM1 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | GPS1 |
| USART6 | /dev/ttyS4 | RC SBUS |

View File

@ -79,7 +79,7 @@ Pinouts definition can be found in the [MicoAir743-Lite_pinout.xlsx](https://raw
| UART | 设备 | Port |
| ------ | ---------- | ------ |
| USART1 | UART | TELEM1 |
| USART1 | /dev/ttyS0 | TELEM1 |
| USART2 | /dev/ttyS1 | GPS2 |
| USART3 | /dev/ttyS2 | GPS1 |
| UART4 | /dev/ttyS3 | TELEM2 |

View File

@ -113,7 +113,7 @@ You can also find MindRacer at Amazon<sup>&reg;</sup> or eBay<sup>&reg;</sup>.
| UART | 设备 | Port |
| ------ | ---------- | ------ |
| USART1 | UART | RC |
| USART1 | /dev/ttyS0 | RC |
| USART2 | /dev/ttyS1 | TELEM1 |
| USART3 | /dev/ttyS2 | TELEM2 |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -130,7 +130,7 @@ make modalai_fc-v1
| UART | 设备 | Port |
| ------ | ---------- | ----------------------------------------------------------- |
| USART1 | UART | GPS1 (J10) |
| USART1 | /dev/ttyS0 | GPS1 (J10) |
| USART2 | /dev/ttyS1 | TELEM3 (J4) |
| USART3 | /dev/ttyS2 | Debug Console (J2) |
| UART4 | /dev/ttyS3 | Expansion UART (J6) |

View File

@ -186,7 +186,7 @@ _Note: mappings shown are for the PX4 controlled interfaces only_
| UART | 设备 | Port |
| ------ | ---------- | ---------------------------------------- |
| USART1 | UART | GPS1 (J1012) |
| USART1 | /dev/ttyS0 | GPS1 (J1012) |
| USART2 | /dev/ttyS1 | TELEM3 (J1002) |
| USART3 | /dev/ttyS2 | Debug Console (J1001) |
| UART4 | /dev/ttyS3 | Expansion UART (J6) |

View File

@ -106,7 +106,7 @@ There is also an [ARM20-CTX 20-Pin to TC2030-IDC adapter](https://www.tag-connec
| UART | 设备 | Port |
| ------ | ---------- | -------------------------------------------------------------------------------------------------- |
| USART2 | UART | TELEM1 (流控) |
| USART2 | /dev/ttyS0 | TELEM1 (流控) |
| USART3 | /dev/ttyS1 | TELEM2 (流控) |
| UART4 | /dev/ttyS2 | GPS1 |
| USART6 | /dev/ttyS3 | Flex port (can be configured as SPI or UART with Flow Control). |

View File

@ -88,7 +88,7 @@ See [3DR Pixhawk 1 > Pinouts](../flight_controller/pixhawk.md#pinouts)
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | IO debug |
| UART | /dev/ttyS0 | IO debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -111,7 +111,7 @@ The board is documented on the mRo hardware repo: [x21_V2_schematic.pdf](https:/
| UART | 设备 | Port |
| ------ | ---------- | --------------- |
| USART1 | UART | IO debug |
| USART1 | /dev/ttyS0 | IO debug |
| USART2 | /dev/ttyS1 | SERIAL1 |
| USART3 | /dev/ttyS2 | TELEM2 |
| UART4 | /dev/ttyS3 | GPS/I2C |

View File

@ -182,7 +182,7 @@ _MR-VMU-RT1176_ connectors (following [Pixhawk Connector Standard](https://githu
| UART | 设备 | Port |
| ------ | ---------- | -------- |
| UART | UART | Debug |
| UART | /dev/ttyS0 | Debug |
| UART3 | /dev/ttyS1 | GPS |
| UART4 | /dev/ttyS2 | TELEM1 |
| UART5 | /dev/ttyS3 | GPS2 |

View File

@ -164,7 +164,7 @@ Here is an example implementation. I used a Spektrum plug to get 3.3v from the D
| UART | 设备 | Port |
| ------ | ---------- | -------- |
| USART1 | UART | SerialRX |
| USART1 | /dev/ttyS0 | SerialRX |
| USART4 | /dev/ttyS1 | TELEM1 |
| USART6 | /dev/ttyS2 | GPS |

View File

@ -68,7 +68,7 @@ Developers will need to solder wires to the board test pads for SWD, and to the
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------------------- |
| UART | UART | IO Debug |
| UART | /dev/ttyS0 | IO Debug |
| USART2 | /dev/ttyS1 | TELEM1 (No flow control) |
| UART4 | /dev/ttyS2 | GPS |

View File

@ -80,7 +80,7 @@ make px4_fmu-v3_default
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | IO debug |
| UART | /dev/ttyS0 | IO debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -126,7 +126,7 @@ Board schematics and other documentation can be found here: [The Cube Project](h
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| USART1 | UART | <!-- IO debug? --> |
| USART1 | /dev/ttyS0 | <!-- IO debug? --> |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -247,7 +247,7 @@ Due to space constraints two ports are on one connector.
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | IO debug |
| UART | /dev/ttyS0 | IO debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -77,7 +77,7 @@ For information about wiring and using this port see:
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | WiFi |
| UART | /dev/ttyS0 | WiFi |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -77,7 +77,7 @@ The exception is the [debug port(s)](#debug_port) (pin 1 is the right-most, as s
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | GPS |
| UART | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | TELEM4 |

View File

@ -129,7 +129,7 @@ The pinout uses the standard [Pixhawk debug connector](https://github.com/pixhaw
| UART | 设备 | QGC Parameter Description | Port Label on FC |
| :----: | :--------: | :-----------------------: | :-----------------------------------------: |
| UART | UART | GPS1 | GPS Module |
| UART | /dev/ttyS0 | GPS1 | GPS Module |
| USART2 | /dev/ttyS1 | TELEM1 | TELEM1 |
| USART3 | /dev/ttyS2 | TELEM2 | N/A |
| UART4 | /dev/ttyS3 | TELEM/SERIAL4 | UART/l2C B |

View File

@ -140,7 +140,7 @@ Connector pin assignments are left to right (i.e. Pin 1 is the left-most pin).
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 & I2C |

View File

@ -112,7 +112,7 @@ The [Pixhawk 6C Wiring Quick Start](../assembly/quick_start_pixhawk6c.md) provid
| UART | 设备 | Port |
| ------ | ---------- | ------ |
| USART1 | UART | GPS1 |
| USART1 | /dev/ttyS0 | GPS1 |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART5 | /dev/ttyS3 | TELEM2 |

View File

@ -111,7 +111,7 @@ Please refer to the [Pixhawk 4 Mini Wiring Quick Start](../assembly/quick_start_
| UART | 设备 | QGC Parameter Description | Port Label on FC |
| ------ | ---------- | ------------------------- | ---------------- |
| USART1 | UART | GPS1 | GPS1 |
| USART1 | /dev/ttyS0 | GPS1 | GPS1 |
| USART2 | /dev/ttyS1 | TELEM3 | N/A |
| USART3 | /dev/ttyS2 | N/A | FMU Debug |
| UART5 | /dev/ttyS3 | TELEM2 | TELEM2 |

View File

@ -157,7 +157,7 @@ Sample Wiring Diagram
| UART | 设备 | Port |
| ------ | ---------- | -------- |
| UART | UART | Debug |
| UART | /dev/ttyS0 | Debug |
| UART3 | /dev/ttyS1 | GPS |
| UART4 | /dev/ttyS2 | TELEM1 |
| UART5 | /dev/ttyS3 | GPS2 |

View File

@ -188,7 +188,7 @@ Sample Wiring Diagram
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 & I2C |

View File

@ -148,7 +148,7 @@ The [Pixhawk 6X Wiring Quick Start](../assembly/quick_start_pixhawk6x.md) provid
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 & I2C |

View File

@ -190,7 +190,7 @@ For information about using this port see:
| UART | 设备 | Port |
| ------ | ---------- | --------------------------------- |
| UART | UART | WiFi (ESP8266) |
| UART | /dev/ttyS0 | WiFi (ESP8266) |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | | |

View File

@ -103,7 +103,7 @@ This autopilot is [supported](../flight_controller/autopilot_pixhawk_standard.md
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 & I2C |

View File

@ -304,7 +304,7 @@ Recommended modules include:
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | GPS1 |
| UART | /dev/ttyS0 | GPS1 |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | GPS2 |

View File

@ -76,7 +76,7 @@ CRSF receiver must be wired to a spare port (UART) on the Flight Controller. The
| UART | 设备 | Port |
| ------ | ---------- | -------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM3 |
| USART3 | /dev/ttyS2 | 调试控制台 |
| UART4 | /dev/ttyS3 | UART4 |

View File

@ -52,7 +52,7 @@ It is based on the **Pixhawk-project FMUv3** open hardware design and runs **PX4
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| USART1 | UART | IO Processor Debug |
| USART1 | /dev/ttyS0 | IO Processor Debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -56,7 +56,7 @@ It is based on the **Pixhawk-project FMUv3** open hardware design and runs **PX4
| UART | 设备 | Port |
| ------ | ---------- | --------------------------------------------- |
| USART1 | UART | IO Processor Debug |
| USART1 | /dev/ttyS0 | IO Processor Debug |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (Raspberry pi cm3+) |
| UART4 | /dev/ttyS3 | GPS1 |

View File

@ -62,7 +62,7 @@ CRSF receiver must be wired to a spare port (UART) on the Flight Controller. The
| UART | 设备 | Port |
| ------ | ---------- | ------- |
| USART1 | UART | GPS |
| USART1 | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | GPS2 |
| USART3 | /dev/ttyS2 | TELEM1 |
| UART4 | /dev/ttyS3 | TELEM2 |

View File

@ -14,8 +14,8 @@
<!-- instructions from DavidS here: https://github.com/PX4/PX4-user_guide/pull/672#issuecomment-598198434 -->
本节将展示如何通过检查板载配置文件获取在STMxxyyy架构上构建NuttX所需的映射信息。
该说明使用FMUv5但同样可扩展至其他FMU版本/NuttX开发板。
本节将展示如何通过检查板载配置文件,获取在 STMxxyyy 架构上构建 NuttX 所需的映射信息。
该说明使用 FMUv5但同样可扩展至其他FMU版本/NuttX开发板。
###
@ -49,7 +49,7 @@ CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS3"
### nsh/defconfig
_nsh/defconfig_ 允许您确定哪些端口被定义,它们是 UART 还是 USART以及 USART/UART 与设备之间的映射关系。
您还可以确定用于该功能的端口[serial/debug console](../debug/system_console.md)。
您还可以确定用于该功能的端口[串口/调试控制台](../debug/system_console.md)。
打开板载的 defconfig 配置文件,例如:[/boards/px4/fmu-v5/nuttx-config/nsh/defconfig](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L215-L221)
@ -69,7 +69,7 @@ CONFIG_STM32F7_USART6=y
这些条目会告知您哪些端口已被定义以及它们属于UART还是USART。
复制上方段落按“n”进行数字排序。
同时递增设备编号ttySn基于零的计数),以获取设备到串行端口的映射关系。
同时递增设备编号 _ttyS**n**_(从零开始计数),以获取设备到串行端口的映射关系。
```
ttyS0 CONFIG_STM32F7_USART1=y
@ -81,7 +81,7 @@ ttyS5 CONFIG_STM32F7_UART7=y
ttyS6 CONFIG_STM32F7_UART8=y
```
要获取调试控制台映射,我们需在[defconfig file](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L212) 搜索 `SERIAL_CONSOLE`.
要获取调试控制台映射,我们需在[defconfig file](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L212) 搜索 `SERIAL_CONSOLE`
下面我们看到控制台位于UART7
```
@ -117,11 +117,11 @@ ttyS5 CONFIG_STM32F7_UART7=y DEBUG
ttyS6 CONFIG_STM32F7_UART8=y PX4IO
```
在 [flight controller docs]../flight_controller/pixhawk4.md#serial-port-mapping最终生成的表格如下
在 [flight controller docs](../flight_controller/pixhawk4.md#serial-port-mapping) 最终生成的表格如下:
| UART | 设备 | Port |
| ------ | ---------- | ------------------------------ |
| UART | UART | GPS |
| UART | /dev/ttyS0 | GPS |
| USART2 | /dev/ttyS1 | TELEM1 (流控) |
| USART3 | /dev/ttyS2 | TELEM2 (流控) |
| UART4 | /dev/ttyS3 | TELEM4 |

View File

@ -56,7 +56,7 @@ _PX4_ 是一款专业级飞控。
### 我想添加一个有效载荷/相机
[有效载荷](payloads/index.md部分描述了如何添加相机以及如何配置 PX4 以实现交付包裹。
[有效载荷](payloads/index.md)部分描述了如何添加相机,以及如何配置 PX4 以实现交付包裹。
### 我正在修改一个支持的载具
@ -76,7 +76,7 @@ _PX4_ 是一款专业级飞控。
## 获取帮助
[支持](contribute/support.md页解释了如何从核心开发团队和更广泛的社区获得帮助。
[支持](contribute/support.md)页解释了如何从核心开发团队和更广泛的社区获得帮助。
除此以外,它还包括了:
@ -111,7 +111,7 @@ _PX4_ 是一款专业级飞控。
## 许可证
PX4 code is free to use and modify under the terms of the permissive [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause).
PX4 代码可依据宽松的 [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause) 免费使用和修改。
此文档已使用 [CC BY 4.0]授权。(https://creativecommons.org/licenses/by/4.0/)。
详情见: [Licences](contribute/licenses.md)。
@ -137,11 +137,11 @@ _Dronecode 日历_ 展示了面向平台用户和开发者的重要社区活动
<img src="../assets/site/position_fixed.svg" title="Position fix required (e.g. GPS)" width="30px" /> _placeholder_icon 由 <a href="https://www.flaticon.com/authors/smashicons" title="Smashicons">Smashicons</a> 通过 <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> 创作,使用 <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 By</a> 授权。
<img src="../assets/site/automatic_mode.svg" title="Automatic mode" width="30px" /> _camera-automatic-mode_ icon made by <a href="https://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>.
<img src="../assets/site/automatic_mode.svg" title="Automatic mode" width="30px" /> _camera-automatic-mode_ 图标由 <a href="https://www.freepik.com" title="Freepik">Freepik</a> <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> 是由 <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 By</a> 授权的。
## 治理
The PX4 flight stack is hosted under the governance of the [Dronecode Project](https://dronecode.org/).
PX4 飞行控制架构由[Dronecode Project](https://dronecode.org/)负责管理。
<a href="https://dronecode.org/" style="padding:20px" ><img src="../assets/site/logo_dronecode.png" alt="Dronecode Logo" width="110px"/></a> <a href="https://www.linuxfoundation.org/projects" style="padding:20px;"><img src="../assets/site/logo_linux_foundation.png" alt="Linux Foundation Logo" width="80px" /></a>

View File

@ -280,6 +280,8 @@ For more information see: [Plotting uORB Topic Data in Real Time using PlotJuggl
## 另见
- [uORB Documentation Standard](../uorb/uorb_documentation.md)
- _PX4 uORB Explained_ Blog series
- [Part 1](https://px4.io/px4-uorb-explained-part-1/)
- [Part 2](https://px4.io/px4-uorb-explained-part-2/)

View File

@ -3,80 +3,42 @@
Many PX4 drones use brushless motors that are driven by the flight controller via an Electronic Speed Controller (ESC).
The ESC takes a signal from the flight controller and uses it to set control the level of power delivered to the motor.
PX4 supports a number of common protocols for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
PX4 supports a number of [common protocols](../esc/esc_protocols.md) for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
## Supported ESC
The following list is non-exhaustive.
| ESC Device | Protocols | Firmwares | 备注 |
| ---------------------------- | ------------------------------------ | ------------------------ | ----------------------------------------------------- |
| [ARK 4IN1 ESC] | [Dshot], [PWM] | [AM32] | Has versions with/without connnectors |
| [Holybro Kotleta 20] | [DroneCAN], [PWM] | [PX4 Sapog ESC Firmware] | |
| [Vertiq Motor & ESC modules] | [Dshot], [OneShot], Multishot, [PWM] | Vertiq firmware | Larger modules support DroneCAN, ESC and Motor in one |
| [VESC ESCs] | [DroneCAN], [PWM] | VESC project firmware | |
| [Zubax Telega] | [DroneCAN], [PWM] | Telega-based | ESC and Motor in one |
<!-- Links for table above -->
[ARK 4IN1 ESC]: ../esc/ark_4in1_esc.md
[AM32]: https://am32.ca/
[PX4 Sapog ESC Firmware]: ../dronecan/sapog.md
[VESC ESCs]: ../peripherals/vesc.md
[DroneCAN]: ../dronecan/escs.md
[Dshot]: ../peripherals/dshot.md
[OneShot]: ../peripherals/oneshot.md
[PWM]: ../peripherals/pwm_escs_and_servo.md
[Holybro Kotleta 20]: ../dronecan/holybro_kotleta.md
[Vertiq Motor & ESC modules]: ../peripherals/vertiq.md
[Zubax Telega]: ../dronecan/zubax_telega.md
## 另见
有关详细信息,请参阅︰
- [ESC Protocols](../esc/esc_protocols.md) — overview of main ESC/Servo protocols supported by PX4
- [PWM ESCs and Servos](../peripherals/pwm_escs_and_servo.md)
- [OneShot ESCs and Servos](../peripherals/oneshot.md)
- [DShot](../peripherals/dshot.md)
- [DroneCAN ESCs](../dronecan/escs.md)
- [ESC Calibration](../advanced_config/esc_calibration.md)
- [ESC Firmware and Protocols Overview](https://oscarliang.com/esc-firmware-protocols/) (oscarliang.com)
A high level overview of the main ESC/Servo protocols supported by PX4 is given below.
## ESC Protocols
### PWM
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired power level.
The pulse wdith typically ranges between 1000uS for zero power and 2000uS for full power.
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50Hz and 490 Hz (the theoretical maximum being 500Hz for a very small "off" cycle).
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
For PWM servos 50Hz is usually sufficient, and many don't support higher rates.
![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png)
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the range values representing low and high values can vary significantly.
Unlike [dshot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
### Oneshot 125
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
There are a number of variants of the OneShot protocol, which support different rates.
PX4 only supports OneShot 125.
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125us to 250us for zero to full power).
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
The actual supported rate depends on the ESC used.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
### DShot
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduce latency, in particular racing multicopters, VTOL vehicles, and so on.
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can revers motor spin directions
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
Selecting a higher rate DShot ESC in the UI result in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
### DroneCAN
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
The PX4 implementation is currently limited to update rates of 200Hz.
DroneCAN shares many similar benefits to [Dshot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).

View File

@ -0,0 +1,170 @@
# uORB Documentation Standard
This topic demonstrates and explains how to document uORB messages.
:::info
At time of writing many topics have not been updated.
:::
## 综述
The [AirspeedValidated](../msg_docs/AirspeedValidated.md) message shown below is a good example of a uORB topic that has been documented to the current standard.
```py
# Validated airspeed
#
# Provides information about airspeed (indicated, true, calibrated) and the source of the data.
# Used by controllers, estimators and for airspeed reporting to operator.
uint32 MESSAGE_VERSION = 1
uint64 timestamp # [us] Time since system start
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
float32 calibrated_airspeed_m_s # [m/s] [@invalid NaN] Calibrated airspeed (CAS)
float32 true_airspeed_m_s # [m/s] [@invalid NaN] True airspeed (TAS)
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
int8 SOURCE_SENSOR_1 = 1 # Sensor 1
int8 SOURCE_SENSOR_2 = 2 # Sensor 2
int8 SOURCE_SENSOR_3 = 3 # Sensor 3
int8 SOURCE_SYNTHETIC = 4 # Synthetic airspeed
float32 calibrated_ground_minus_wind_m_s # [m/s] [@invalid NaN] CAS calculated from groundspeed - windspeed, where windspeed is estimated based on a zero-sideslip assumption
float32 calibraded_airspeed_synth_m_s # [m/s] [@invalid NaN] Synthetic airspeed
float32 airspeed_derivative_filtered # [m/s^2] Filtered indicated airspeed derivative
float32 throttle_filtered # [-] Filtered fixed-wing throttle
float32 pitch_filtered # [rad] Filtered pitch
```
The main things to note are:
- Documentation is added using formatted uORB comments.
Any text on a line after the `#` character is a comment, except for lines that start with the text `# TOPIC` (which indicates a multi-topic message).
- The message starts with a comment block consisting of short description (mandatory), followed by a longer description and then a space.
- Field and constants almost all have comments.
The comments are added on the same line as the field/constant, separated by one space.
- Fields:
- Comments are all on the same line as the field (extra lines become internal comments).
- Comments start with metadata, such as the units (`[m/s]`, `[rad/s]`) or allowed values (`[@enum SOURCE]`), and can also list invalid values (`[@invalid NaN]`) and allowed ranges (`[@range min, max]`).
- Units are required except for boolean fields or for fields with an enum value.
`[-]` is used to indicate unitless fields.
- Comments follow the metadata after a space.
The line should not be terminated in a full stop.
- Constants:
- Don't have metadata: the description follows the comment marker after one space.
- Some constants, such as `MESSAGE_VERSION`, don't need documentation because they are standardized.
- Constants with the same name prefix are grouped together as enums after the associated field.
The following sections expand on the allowed formats.
## Message Description
Every message should start with a comment block that describes the message:
```py
# Short description (mandatory)
#
# Longer description for the message if needed.
# Can be multiline, and should have punctuation.
# Should be followed by an empty line.
```
This consists of a mandatory short description, optionally followed by an empty comment line, and then a longer description.
Short description (mandatory):
- A succinct explanation for the purpose of the message.
- Usually just one line without a terminating full stop.
- Minimally it may just mirror the message name.
- For example, [`AirspeedValidated`](../msg_docs/AirspeedValidated.md) above has the short description `Validated airspeed`.
Long description (Optional):
- Additional context required to understand how the message is used.
- In particular this should be anything that can't be inferred from the name, fields or constants, such as the publishers and expected consumers.
It might also cover whether the message is only used for a particular frame type or mode.
- The message is often multiline and contains punctuation.
- May include comment lines that are empty, in order to indicate paragraphs.
Both short and long descriptions may be multi-line.
Single line descriptions should not include a terminating full stop, but multiline comments should do so.
The message description block ends at the first non-comment line, which should be an empty line, but might be a field or constant.
Any subsequent comment lines are considered "internal comments".
### Fields
A typical field comment looks like this:
```py
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
```
Field comments must all be on the same line as the field, and consist of optional metadata followed by a description:
- `metadata` (Optional)
- Information about the field units and allowed values:
- `[<unit>]`
- The unit of measurement inside square brackets (note, no `@` delineator indicates a unit), such as `[m]` for metres.
- Allowed units include: `m`, `m/s`, `m/s^2`, `rad`, `rad/s`, `rpm`, `V`, `A`, `mA`, `mAh`, `W`, `dBm`, `s`, `ms`, `us`, `Ohm`, `MB`, `Kb/s`, `degC`, `Pa`.
- Units are required unless clearly invalid, such as when the field is a boolean, or is an enum value.
- Unitless values should be specified as `[-]`.
Note though that units are not required for boolean fields or enum fields.
- `[@enum <enum_name>]`
- The `enum_name` gives the prefix of constant values in the message that can be assigned to the field.
Note that enums in uORB are just a naming convention: they are not explicitly declared.
Multiple enum names allowed for a field indicates a possible error in the field design.
- `[@range <lower_value>, <upper_value>]`
- The allowed range of the field, specified as a `lower_value` and/or an `upper_value`.
Either value can be omitted to indicate an unbounded upper or lower value.
For example `[@range 0, 3]`, `[@range 5.3, ]`, `[@range , 3]`.
- `[@invalid <value> <description>]`
- The `value` to set the field to indicate that the field doesn't contain valid data, such as `[@invalid NaN]`.
The `description` is optional, and might be used to indicate the conditions under which data is invalid.
- `[@frame <value>]`
- The `frame` in which the field is set, such as `[@frame NED]` or `[@frame Body]`.
- `description`
- A concise description of the purpose of the field, and including any important information that can't be inferred from the name!
Use a capital first letter, and omit the full stop if the description is a single sentence.
Multiple sentences may also omit the final full stop.
### Constants
Constants follow the documentation conventions as fields except they only have a description (no metadata).
Documentation for a constant might look like this:
```py
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
```
Constants are often grouped together following a field as enum values.
Note below how the prefix `SOURCE` for the values is specified as an enum against the _field_.
```py
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
...
```
A small number of constants have a standardised meaning and do not require documentation.
These are:
- `ORB_QUEUE_LENGTH`
- `MESSAGE_VERSION`
### `# TOPICS`
The prefix `# TOPICS` is used to indicate topic names for multi-topic messages.
For example, the [VehicleGlobalPosition.msg](../msg_docs/VehicleGlobalPosition.md) message definition is used to define the topic ids as shown:
```text
# TOPICS vehicle_global_position vehicle_global_position_groundtruth external_ins_global_position
# TOPICS estimator_global_position
# TOPICS aux_global_position
```
At time of writing there is no format for documenting these.