mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 21:48:28 -04:00
autotest: added arming to the Rover autotesting.
This commit is contained in:
parent
039ea59d7e
commit
e1b608d56d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user