mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
autotest: add test for stick-mixing in auto mode
This commit is contained in:
parent
aec179ca40
commit
8fd5df33d5
@ -5922,6 +5922,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
self.delay_sim_time(10)
|
||||
self.assert_prearm_failure("Motors Emergency Stopped")
|
||||
self.context_pop()
|
||||
self.reboot_sitl()
|
||||
|
||||
def assert_mode(self, mode):
|
||||
if not self.mode_is(mode):
|
||||
@ -5934,6 +5935,25 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
self.change_mode(x)
|
||||
self.assert_mode(want)
|
||||
|
||||
def StickMixingAuto(self):
|
||||
items = []
|
||||
self.set_parameter('STICK_MIXING', 1)
|
||||
# home
|
||||
items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, 0),)
|
||||
# 1 waypoint a long way away
|
||||
items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 2000, 0, 0),)
|
||||
self.upload_simple_relhome_mission(items)
|
||||
if self.mavproxy is not None:
|
||||
# handy for getting pretty pictures
|
||||
self.mavproxy.send("wp list\n")
|
||||
self.change_mode('AUTO')
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
self.set_rc(1, 1150)
|
||||
self.wait_heading(45)
|
||||
self.wait_heading(90)
|
||||
self.disarm_vehicle()
|
||||
|
||||
def tests(self):
|
||||
'''return list of all tests'''
|
||||
ret = super(AutoTestRover, self).tests()
|
||||
@ -6184,6 +6204,10 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
"Ensure EStop prevents arming when asserted at boot time",
|
||||
self.EStopAtBoot),
|
||||
|
||||
("StickMixingAuto",
|
||||
"Ensure Stick Mixing works in auto",
|
||||
self.StickMixingAuto),
|
||||
|
||||
])
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user