Skip to content

Commit

Permalink
autotest: Test when invalid tag is selected via DO_JUMP_TAG
Browse files Browse the repository at this point in the history
  • Loading branch information
nexton-winjeel committed Oct 9, 2023
1 parent cc3eea8 commit 847b085
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:"])
Expand Down Expand Up @@ -10452,6 +10468,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,
Expand Down

0 comments on commit 847b085

Please sign in to comment.