From c31a35f291f08fc2650a01e72fa917904d0661ab Mon Sep 17 00:00:00 2001 From: Nick Exton Date: Mon, 9 Oct 2023 11:08:30 +1100 Subject: [PATCH] autotest: Test when invalid tag is selected via DO_JUMP_TAG --- Tools/autotest/arducopter.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index b344f49f9bddc7..0c0c968bc0704c 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -3274,6 +3274,22 @@ def MissionIndexValidity(self): timeout=1, want_result=mavutil.mavlink.MAV_RESULT_DENIED) + def InvalidJumpTags(self): + '''Verify the behaviour when selecting invalid jump tags.''' + + MAX_TAG_NUM = 65535 + # Jump tag is not present, so expect FAILED + self.run_cmd(mavutil.mavlink.MAV_CMD_DO_JUMP_TAG, + p1=MAX_TAG_NUM, + timeout=1, + want_result=mavutil.mavlink.MAV_RESULT_FAILED) + + # Jump tag is too big, so expect DENIED + self.run_cmd(mavutil.mavlink.MAV_CMD_DO_JUMP_TAG, + p1=MAX_TAG_NUM+1, + timeout=1, + want_result=mavutil.mavlink.MAV_RESULT_DENIED) + def GPSViconSwitching(self): """Fly GPS and Vicon switching test""" self.customise_SITL_commandline(["--uartF=sim:vicon:"]) @@ -10474,6 +10490,7 @@ def tests2b(self): # this block currently around 9.5mins here self.FlyMissionTwice, self.FlyMissionTwiceWithReset, self.MissionIndexValidity, + self.InvalidJumpTags, self.IMUConsistency, self.AHRSTrimLand, self.GuidedYawRate,