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

autotest: allow frame to be specified when creating simple missions #26795

Merged
merged 1 commit into from
Apr 15, 2024
Merged
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: 7 additions & 1 deletion Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3995,7 +3995,11 @@ def create_simple_relhome_mission(self, items_in, target_system=1, target_compon
seq += 1
ret.append(item)
continue
(t, n, e, alt) = item
opts = {}
try:
(t, n, e, alt, opts) = item
except ValueError:
(t, n, e, alt) = item
lat = 0
lng = 0
if n != 0 or e != 0:
Expand All @@ -4005,6 +4009,8 @@ def create_simple_relhome_mission(self, items_in, target_system=1, target_compon
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

Expand Down
Loading