Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions en/mavgen_python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ You will also need to include them in *pymavlink* and install them locally on yo

The libraries can then be used in the same way as those installed using *pip*.

### Using custom dialect with pymavlink installed pip

Another way to use a custom dialect with a standard installation of *pymavlink* with *pip* is
1. [Generate](../getting_started/generate_libraries.md) the Python libraries for your dialect.
1. Copy the generated **.py** dialect file into folder you have the code (for example: customDialect.py)
1. You need to change one import on the generated file
```python
# from ...generator.mavcrc import x25crc
from pymavlink.generator.mavcrc import x25crc
```
1. And finally use the new dialect in the code
```python
import pymavlink.mavutil as mavutil
import customDialec # the file is customDialect.py

mavutil.mavlink = customDialec
mav = mavutil.mavlink_connection(...)
```

## Using the Libraries

Expand Down