Skip to content

Commit

Permalink
generator/mavgen.py: honour MDEF from environment in dynamic generation
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Apr 2, 2024
1 parent a71c7b7 commit 498f2a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/mavgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def __init__(self, output, wire_protocol=DEFAULT_WIRE_PROTOCOL, language=DEFAULT
def mavgen_python_dialect(dialect, wire_protocol, with_type_annotations):
'''generate the python code on the fly for a MAVLink dialect'''
dialects = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'dialects')
mdef = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'message_definitions')
mdef = os.getenv("MDEF", default=os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'message_definitions'))
legacy_path = "python2" if not with_type_annotations else ""
if wire_protocol == mavparse.PROTOCOL_0_9:
py = os.path.join(dialects, 'v09', legacy_path, dialect + '.py')
Expand Down

0 comments on commit 498f2a5

Please sign in to comment.