Skip to content

Commit c236261

Browse files
committed
autotest: allow frame to be specified when creating simple missions
1 parent 5a21d0c commit c236261

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Tools/autotest/vehicle_test_suite.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3995,7 +3995,11 @@ def create_simple_relhome_mission(self, items_in, target_system=1, target_compon
39953995
seq += 1
39963996
ret.append(item)
39973997
continue
3998-
(t, n, e, alt) = item
3998+
opts = {}
3999+
try:
4000+
(t, n, e, alt, opts) = item
4001+
except ValueError:
4002+
(t, n, e, alt) = item
39994003
lat = 0
40004004
lng = 0
40014005
if n != 0 or e != 0:
@@ -4005,6 +4009,8 @@ def create_simple_relhome_mission(self, items_in, target_system=1, target_compon
40054009
frame = mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT_INT
40064010
if not self.ardupilot_stores_frame_for_cmd(t):
40074011
frame = mavutil.mavlink.MAV_FRAME_GLOBAL
4012+
if opts.get('frame', None) is not None:
4013+
frame = opts.get('frame')
40084014
ret.append(self.create_MISSION_ITEM_INT(t, seq=seq, frame=frame, x=int(lat*1e7), y=int(lng*1e7), z=alt))
40094015
seq += 1
40104016

0 commit comments

Comments
 (0)