mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
Tools: AP_Arming ensures mission items present when in auto mode
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
This commit is contained in:
parent
941bb6a45b
commit
5cc046b9cc
@ -9854,6 +9854,7 @@ class AutoTestCopter(AutoTest):
|
||||
self.IMUConsistency,
|
||||
self.AHRSTrimLand,
|
||||
self.GuidedYawRate,
|
||||
self.NoArmWithoutMissionItems,
|
||||
])
|
||||
return ret
|
||||
|
||||
|
@ -4571,6 +4571,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.MissionJumpTags,
|
||||
self.GCSFailsafe,
|
||||
self.SDCardWPTest,
|
||||
self.NoArmWithoutMissionItems,
|
||||
])
|
||||
return ret
|
||||
|
||||
|
@ -7309,6 +7309,19 @@ class AutoTest(ABC):
|
||||
# Check fence is not enabled
|
||||
self.assert_not_receiving_message('FENCE_STATUS', timeout=timeout)
|
||||
|
||||
def NoArmWithoutMissionItems(self):
|
||||
'''ensure we can't arm in auto mode without mission items present'''
|
||||
# load a trivial mission
|
||||
items = []
|
||||
items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, 20000),)
|
||||
items.append((mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 0))
|
||||
self.upload_simple_relhome_mission(items)
|
||||
|
||||
self.change_mode('AUTO')
|
||||
self.clear_mission(mavutil.mavlink.MAV_MISSION_TYPE_ALL)
|
||||
self.assert_prearm_failure('Mode requires mission',
|
||||
other_prearm_failures_fatal=False)
|
||||
|
||||
def assert_prearm_failure(self,
|
||||
expected_statustext,
|
||||
timeout=5,
|
||||
|
@ -6354,6 +6354,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
self.GCSFailsafe,
|
||||
self.InitialMode,
|
||||
self.DriveMaxRCIN,
|
||||
self.NoArmWithoutMissionItems,
|
||||
])
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user