Tools: add InterActTest to show interaction with automated setup
This commit is contained in:
parent
675c6e27e9
commit
54c5809428
@ -4983,6 +4983,38 @@ class AutoTestPlane(AutoTest):
|
|||||||
|
|
||||||
self.fly_home_land_and_disarm()
|
self.fly_home_land_and_disarm()
|
||||||
|
|
||||||
|
def start_flying_simple_rehome_mission(self, items):
|
||||||
|
'''uploads items, changes mode to auto, waits ready to arm and arms
|
||||||
|
vehicle. If the first item it a takeoff you can expect the
|
||||||
|
vehicle to fly after this method returns
|
||||||
|
'''
|
||||||
|
|
||||||
|
self.upload_simple_relhome_mission(items)
|
||||||
|
|
||||||
|
self.change_mode('AUTO')
|
||||||
|
self.wait_ready_to_arm()
|
||||||
|
|
||||||
|
self.arm_vehicle()
|
||||||
|
|
||||||
|
def InteractTest(self):
|
||||||
|
'''just takeoff'''
|
||||||
|
|
||||||
|
if self.mavproxy is None:
|
||||||
|
raise NotAchievedException("Must be started with --map")
|
||||||
|
|
||||||
|
self.start_flying_simple_rehome_mission([
|
||||||
|
(mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 0, 30),
|
||||||
|
(mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 800, 0, 0),
|
||||||
|
(mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 800, 800, 0),
|
||||||
|
(mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 400, 0),
|
||||||
|
])
|
||||||
|
|
||||||
|
self.wait_current_waypoint(4)
|
||||||
|
|
||||||
|
self.set_parameter('SIM_SPEEDUP', 1)
|
||||||
|
|
||||||
|
self.mavproxy.interact()
|
||||||
|
|
||||||
def tests(self):
|
def tests(self):
|
||||||
'''return list of all tests'''
|
'''return list of all tests'''
|
||||||
ret = super(AutoTestPlane, self).tests()
|
ret = super(AutoTestPlane, self).tests()
|
||||||
@ -5081,10 +5113,12 @@ class AutoTestPlane(AutoTest):
|
|||||||
self.MAV_CMD_DO_GO_AROUND,
|
self.MAV_CMD_DO_GO_AROUND,
|
||||||
self.MAV_CMD_DO_FLIGHTTERMINATION,
|
self.MAV_CMD_DO_FLIGHTTERMINATION,
|
||||||
self.MAV_CMD_DO_LAND_START,
|
self.MAV_CMD_DO_LAND_START,
|
||||||
|
self.InteractTest,
|
||||||
])
|
])
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def disabled_tests(self):
|
def disabled_tests(self):
|
||||||
return {
|
return {
|
||||||
"LandingDrift": "Flapping test. See https://github.com/ArduPilot/ardupilot/issues/20054",
|
"LandingDrift": "Flapping test. See https://github.com/ArduPilot/ardupilot/issues/20054",
|
||||||
|
"InteractTest": "requires user interaction",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user