Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator/mavgen.py: honour MDEF from environment in dynamic generation #617

Merged

Conversation

peterbarker
Copy link
Contributor

Closes #596

@peterbarker peterbarker force-pushed the pr/mdef-in-dynamic-generation branch from 2655822 to 1b93af6 Compare July 3, 2023 07:00
@MauroPfister
Copy link

Hi @peterbarker, any chance this could be merged at some point?

@peterbarker
Copy link
Contributor Author

Hi @peterbarker, any chance this could be merged at some point?

Can you say that you've tested and that this does actually work for you?

@peterbarker peterbarker force-pushed the pr/mdef-in-dynamic-generation branch from 1b93af6 to 498f2a5 Compare April 2, 2024 05:03
@MauroPfister
Copy link

Yes, I can confirm that this is working on Ubuntu 22.04 and Python 3.10.7.

I installed pymavlink with pip install . from your branch and the message definitions from https://github.com/mavlink/mavlink. Then, I tested that the following code snippet works:

from pymavlink import mavutil
import os

os.environ["MAVLINK20"] = "1"
os.environ["MDEF"] = "path_to_my_custom_message_definitions"

mavutil.set_dialect("my_custom_dialect")

@peterbarker peterbarker merged commit c1ca44d into ArduPilot:master Apr 3, 2024
12 checks passed
@peterbarker
Copy link
Contributor Author

Yes, I can confirm that this is working on Ubuntu 22.04 and Python 3.10.7.

I installed pymavlink with pip install . from your branch and the message definitions from https://github.com/mavlink/mavlink. Then, I tested that the following code snippet works:

from pymavlink import mavutil
import os

os.environ["MAVLINK20"] = "1"
os.environ["MDEF"] = "path_to_my_custom_message_definitions"

mavutil.set_dialect("my_custom_dialect")

Thanks for all of that!

I've merged this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating dialects in arbitrary directory on the fly
2 participants