mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
autotest: add test for partial-transfer after mission-upload
This commit is contained in:
parent
2891b37807
commit
39bb63c61f
@ -6749,6 +6749,35 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
shutil.copy('build/sitl/bin/ardurover.noppp', 'build/sitl/bin/ardurover')
|
||||
self.reboot_sitl()
|
||||
|
||||
def FenceFullAndPartialTransfer(self, target_system=1, target_component=1):
|
||||
'''ensure starting a fence transfer then a partial transfer behaves
|
||||
appropriately'''
|
||||
# start uploading a 10 item list:
|
||||
self.mav.mav.mission_count_send(
|
||||
target_system,
|
||||
target_component,
|
||||
10,
|
||||
mavutil.mavlink.MAV_MISSION_TYPE_FENCE
|
||||
)
|
||||
self.assert_receive_mission_item_request(mavutil.mavlink.MAV_MISSION_TYPE_FENCE, 0)
|
||||
# change our mind and try a partial mission upload:
|
||||
self.mav.mav.mission_write_partial_list_send(
|
||||
target_system,
|
||||
target_component,
|
||||
3,
|
||||
3,
|
||||
mavutil.mavlink.MAV_MISSION_TYPE_FENCE)
|
||||
# should get denied for that one:
|
||||
self.assert_receive_mission_ack(
|
||||
mavutil.mavlink.MAV_MISSION_TYPE_FENCE,
|
||||
want_type=mavutil.mavlink.MAV_MISSION_DENIED,
|
||||
)
|
||||
# now wait for the original upload to be "cancelled"
|
||||
self.assert_receive_mission_ack(
|
||||
mavutil.mavlink.MAV_MISSION_TYPE_FENCE,
|
||||
want_type=mavutil.mavlink.MAV_MISSION_OPERATION_CANCELLED,
|
||||
)
|
||||
|
||||
def MissionRetransfer(self, target_system=1, target_component=1):
|
||||
'''torture-test with MISSION_COUNT'''
|
||||
# self.send_debug_trap()
|
||||
@ -6870,6 +6899,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
self.NetworkingWebServerPPP,
|
||||
self.RTL_SPEED,
|
||||
self.MissionRetransfer,
|
||||
self.FenceFullAndPartialTransfer,
|
||||
])
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user