Skip to content

Commit

Permalink
MODES: Add new ArduPilot flight modes to pymavlink
Browse files Browse the repository at this point in the history
Several new modes have been introduced to the various vehicles supported
by ArduPilot since the solo was created.  This patch adds all those new
flight modes to the enumerations in this older version of pymavlink.
For ArduCopter, this adds support for the following modes:
- Throw mode
- ADS-B Avoid (not a user mode)
- Guided with no GPS
- Smart RTL
  • Loading branch information
Pedals2Paddles committed Dec 24, 2017
1 parent db2b859 commit 504713b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pymavlink/mavutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,14 @@ def mode_string_v09(msg):
12 : 'LOITER',
14 : 'LAND',
15 : 'GUIDED',
16 : 'INITIALISING'
16 : 'INITIALISING',
17 : 'QSTABILIZE',
18 : 'QHOVER',
19 : 'QLOITER',
20 : 'QLAND',
21 : 'QRTL'
}

mode_mapping_acm = {
0 : 'STABILIZE',
1 : 'ACRO',
Expand All @@ -1301,15 +1307,21 @@ def mode_string_v09(msg):
14 : 'FLIP',
15 : 'AUTOTUNE',
16 : 'POSHOLD',
17 : 'BRAKE'
17 : 'BRAKE',
18 : 'THROW',
19 : 'AVOID_ADSB',
20 : 'GUIDED_NOGPS',
21 : 'SMART_RTL'
}

mode_mapping_rover = {
0 : 'MANUAL',
2 : 'LEARNING',
3 : 'STEERING',
4 : 'HOLD',
10 : 'AUTO',
11 : 'RTL',
12 : 'SMART_RTL',
15 : 'GUIDED',
16 : 'INITIALISING'
}
Expand All @@ -1329,7 +1341,6 @@ def mode_string_v09(msg):
3 : 'AUTO'
}


def mode_mapping_byname(mav_type):
'''return dictionary mapping mode names to numbers, or None if unknown'''
map = None
Expand Down

0 comments on commit 504713b

Please sign in to comment.