mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:23:34 +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:
co-authored by
Ramon Roche
parent
8e6d2ebe4a
commit
88d623bedb
@@ -0,0 +1,5 @@
|
||||
# UART/Послідовна шина
|
||||
|
||||
У цьому розділі містяться теми про послідовну шину і драйвери послідовної шини:
|
||||
|
||||
- [Making Serial Port Drivers User-Configurable](../uart/user_configurable_serial_driver.md)
|
||||
@@ -0,0 +1,58 @@
|
||||
# Готуємо драйвер Послідовного Порту до користувацьких налаштувань
|
||||
|
||||
Ця тема пояснює, як підготувати драйвер послідовного порту для того, щоб користувач міг налаштувати його (через параметри) для роботи на послідовних портах будь-якого політного контролера.
|
||||
|
||||
## Передумови
|
||||
|
||||
Очікується, що драйвер вже існує і запускається в командному рядку, використовуючи синтаксис команди:
|
||||
|
||||
```sh
|
||||
<driver_name> start -d <serial_port> [-b <baudrate> | -b p:<param_name>]
|
||||
```
|
||||
|
||||
де
|
||||
|
||||
- `-d`: serial port name.
|
||||
- `-b`: Baud rate (optional) if the driver supports multiple baud rates.
|
||||
If supported, the driver must allow you to specify the rate as both a bare baudrate and as a parameter name in the form `-b p:<param_name>` (which can be parsed with `px4_get_parameter_value()`).
|
||||
:::tip
|
||||
See the [gps driver](https://github.com/PX4/PX4-Autopilot/blob/main/src/drivers/gps/gps.cpp#L1023) for an example.
|
||||
|
||||
:::
|
||||
|
||||
## Робимо драйвер налаштовуваним
|
||||
|
||||
Аби зробити драйвер налаштовуваним:
|
||||
|
||||
1. Створіть конфігураційний файл модуля YAML:
|
||||
|
||||
- Add a new file in the driver's source directory named **module.yaml**
|
||||
- Вставте наступний текст і підлаштуйте за потреби:
|
||||
|
||||
```cmake
|
||||
module_name: uLanding Radar
|
||||
serial_config:
|
||||
- command: ulanding_radar start -d ${SERIAL_DEV} -b p:${BAUD_PARAM}
|
||||
port_config_param:
|
||||
name: SENS_ULAND_CFG
|
||||
group: Sensors
|
||||
```
|
||||
|
||||
::: info
|
||||
The full documentation of the module configuration file can be found in the [validation/module_schema.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/validation/module_schema.yaml) file.
|
||||
Це також використовується для перевірки всіх файлів конфігурації в CI.
|
||||
|
||||
:::
|
||||
|
||||
2. Add the module configuration to the **CMakeLists.txt** file for the driver module:
|
||||
|
||||
```cmake
|
||||
px4_add_module(
|
||||
MODULE drivers__ulanding
|
||||
MAIN ulanding_radar
|
||||
SRCS
|
||||
ulanding.cpp
|
||||
MODULE_CONFIG
|
||||
module.yaml
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user