autotest: allow frame to be specified when creating simple missions

This commit is contained in:
Peter Barker 2023-08-03 11:08:03 +10:00 committed by Peter Barker
parent 5a21d0cb8a
commit d964d7f311
1 changed files with 7 additions and 1 deletions

View File

@ -3995,6 +3995,10 @@ class TestSuite(ABC):
seq += 1
ret.append(item)
continue
opts = {}
try:
(t, n, e, alt, opts) = item
except ValueError:
(t, n, e, alt) = item
lat = 0
lng = 0
@ -4005,6 +4009,8 @@ class TestSuite(ABC):
frame = mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT_INT
if not self.ardupilot_stores_frame_for_cmd(t):
frame = mavutil.mavlink.MAV_FRAME_GLOBAL
if opts.get('frame', None) is not None:
frame = opts.get('frame')
ret.append(self.create_MISSION_ITEM_INT(t, seq=seq, frame=frame, x=int(lat*1e7), y=int(lng*1e7), z=alt))
seq += 1