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 3, 2024
1 parent 2f6e31e commit c1ca44d
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 c1ca44d

Please sign in to comment.