autotest: added arming to the Rover autotesting.

This commit is contained in:
Grant Morphett 2015-11-11 13:15:48 +11:00 committed by Andrew Tridgell
parent 039ea59d7e
commit e1b608d56d

View File

@ -13,6 +13,16 @@ testdir=os.path.dirname(os.path.realpath(__file__))
HOME=mavutil.location(40.071374969556928,-105.22978898137808,1583.702759,246)
homeloc = None
def arm_rover(mavproxy, mav):
# wait for EKF to settle
wait_seconds(mav, 15)
mavproxy.send('arm throttle\n')
mavproxy.expect('ARMED')
print("ROVER ARMED")
return True
def drive_left_circuit(mavproxy, mav):
'''drive a left circuit, 50m on a side'''
mavproxy.send('switch 6\n')
@ -142,6 +152,9 @@ def drive_APMrover2(viewerip=None, map=False):
mav.wait_gps_fix()
homeloc = mav.location()
print("Home location: %s" % homeloc)
if not arm_rover(mavproxy, mav):
print("Failed to ARM")
failed = True
if not drive_mission(mavproxy, mav, os.path.join(testdir, "rover1.txt")):
print("Failed mission")
failed = True