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

mavutil.py: default to using 'all' dialect in place of ardupilotmega #650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions mavutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
supports_type_annotations = sys.version_info >= (3,6)

# adding these extra imports allows pymavlink to be used directly with pyinstaller
# without having complex spec files. To allow for installs that don't have ardupilotmega
# without having complex spec files. To allow for installs that don't have the "all" dialect
# at all we avoid throwing an exception if it isn't installed
try:
if supports_type_annotations:
from pymavlink.dialects.v10 import ardupilotmega
from pymavlink.dialects.v10 import all
else:
from pymavlink.dialects.v10.python2 import ardupilotmega
from pymavlink.dialects.v10.python2 import all
except Exception:
pass

Expand All @@ -52,7 +52,7 @@

# Use a globally-set MAVLink dialect if one has been specified as an environment variable.
if not 'MAVLINK_DIALECT' in os.environ:
os.environ['MAVLINK_DIALECT'] = 'ardupilotmega'
os.environ['MAVLINK_DIALECT'] = 'all'

def mavlink10():
'''return True if using MAVLink 1.0 or later'''
Expand Down
Loading