-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Steven-Ajex/main
modified the size of the picture and some mistakes
- Loading branch information
Showing
33 changed files
with
226 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
## 外设 | ||
|
||
本节包含与外部传感器及其他可*连接到飞行控制器*的可选外围硬件相关的主题。 | ||
本节包含与外部传感器及其他可 *连接到飞行控制器* 的可选外围硬件相关的主题。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
docs/content_ch/introduction/configuration/sysconfiguration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
|
||
## 系统配置 | ||
|
||
在配置 FMT 系统模块时,避免重新编译整个系统是很必要的。FMT是一个高度可定制化的系统,并提供了一个[TOML](https://toml.io/en/)文件来配置系统组件。这将给用户根据需求来配置系统提供极大的灵活性。 | ||
|
||
当FMT系统运行起来的时候,它会去自动寻找板载文件系统上的`/sys/sysconfig.toml`配置文件。如果这个文件存在,则会加载里面的配置项。如果这个文件不存在,则会使用`default_config.h`中固化的默认系统配置。注意,默认配置只开启了有限的功能,遥控和电机输出功能都未开启。 | ||
|
||
每个BSP下的config目录都包含一个默认的配置文件 *sysconfig.toml* 。为了开启FMT的所有功能,用户需要将 *sysconfig.toml* 配置文件上传到板子的 */sys* 目录。这个文件包含了模块功能需要的配置信息。 | ||
|
||
- [Amov ICF5 Configuration](https://github.com/Firmament-Autopilot/FMT-Firmware/blob/master/target/amov/icf5/config/sysconfig.toml) | ||
- [CUAV V5+ Configuration](https://github.com/Firmament-Autopilot/FMT-Firmware/blob/master/target/amov/icf5/config/sysconfig.toml) | ||
- [HEX Cubeorange Configuration](https://github.com/Firmament-Autopilot/FMT-Firmware/blob/master/target/cubepilot/cubeorange/config/sysconfig.toml) | ||
- [Pixhawk 4 Configuration](https://github.com/Firmament-Autopilot/FMT-Firmware/blob/master/target/pixhawk/fmu-v5/config/sysconfig.toml) | ||
- [Pixhawk 2.4.6 Configuration](https://github.com/Firmament-Autopilot/FMT-Firmware/blob/master/target/pixhawk/fmu-v2/config/sysconfig.toml) | ||
|
||
比如如下就是pixhawk4的默认`sysconfig.toml`配置文件。注意target的值需要跟BSP的目标名称相匹配(定义在*bsp.h*中)。不然的话系统将无法启动,为了防止使用错误的配置信息。 | ||
|
||
``` | ||
# FMT System Configuration File | ||
# The target should match with BSP's target name | ||
target = "Pixhawk4 FMUv5" | ||
# Console Configuration | ||
[console] | ||
[[console.devices]] | ||
type = "serial" | ||
name = "serial0" | ||
baudrate = 57600 | ||
auto-switch = true | ||
[[console.devices]] | ||
type = "mavlink" | ||
name = "mav_console" | ||
auto-switch = true | ||
# Mavproxy Device Configuration | ||
[mavproxy] | ||
[[mavproxy.devices]] | ||
type = "serial" | ||
name = "serial1" | ||
baudrate = 57600 | ||
[[mavproxy.devices]] | ||
type = "usb" | ||
name = "usbd0" | ||
auto-switch = true | ||
# Pilot CMD Configuration | ||
[pilot-cmd] | ||
# channel mapping for [yaw, throttle, roll, pitch] | ||
stick-channel = [4,3,1,2] | ||
[pilot-cmd.device] | ||
type = "rc" | ||
name = "rc" | ||
protocol = "sbus" # sbus or ppm | ||
channel-num = 6 # max supported channel: sbus:16, ppm:8 | ||
sample-time = 0.05 # sample time in second (-1 for inherit) | ||
range = [1000,2000] | ||
[[pilot-cmd.mode]] | ||
mode = 5 # Position mode | ||
channel = 5 | ||
range = [1000,1200] | ||
[[pilot-cmd.mode]] | ||
mode = 4 # Altitude mode | ||
channel = 5 | ||
range = [1400,1600] | ||
[[pilot-cmd.mode]] | ||
mode = 3 # Stabilize mode | ||
channel = 5 | ||
range = [1800,2000] | ||
[[pilot-cmd.command]] | ||
type = 1 # 1:event | 2:status | ||
cmd = 1002 # FMS_Cmd_Disarm | ||
channel = 6 | ||
range = [1800,2000] | ||
# Actuator Configuration | ||
[actuator] | ||
[[actuator.devices]] | ||
protocol = "pwm" | ||
name = "main_out" | ||
freq = 400 # pwm frequency in Hz | ||
[[actuator.devices]] | ||
protocol = "pwm" | ||
name = "aux_out" | ||
freq = 400 # pwm frequency in Hz | ||
[[actuator.mappings]] | ||
from = "control_out" | ||
to = "main_out" | ||
chan-map = [[1,2,3,4],[1,2,3,4]] | ||
``` | ||
上传配置文件有两种方式: | ||
|
||
1. QGC Onboard File(QGC 3.5.6 only):如果您正在使用QGround-Control 3.5.6,您可以利用其提供的 "Onboard Files" 功能直接将配置文件上传到系统中。这样做简化了整个配置过程,并且能够通过 QGC 轻松地管理配置。 | ||
|
||
<p align="center"> | ||
<img src="./figures/onboard_file.jpg" width="40%"> | ||
</p> | ||
|
||
2. SD 卡阅读器:可以使用 SD 卡阅读器将配置文件上传到系统中。只需将配置文件复制到 SD 卡上,然后插入系统中即可。这种方法不依赖于 QGC 版本,并适用于无法访问 QGC Onboard Files 的系统。 | ||
|
||
更多的配置信息内容,请参考接下来的章节。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.