From c2362619ddb1bfd5d38e6d871224d2005ff96583 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 3 Aug 2023 11:08:03 +1000 Subject: [PATCH] autotest: allow frame to be specified when creating simple missions --- Tools/autotest/vehicle_test_suite.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index e752171665112..2b9755f25a215 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -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: @@ -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