autotest: cope with rover already being close to home in RTL

This commit is contained in:
Andrew Tridgell 2012-11-28 16:31:38 +11:00
parent 4f37a9363a
commit e466333a79

View File

@ -37,9 +37,9 @@ def drive_RTL(mavproxy, mav):
'''drive to home'''
print("Driving home in RTL")
mavproxy.send('switch 3\n')
wait_mode(mav, 'RTL')
if not wait_location(mav, homeloc, accuracy=22, timeout=90):
return False
mavproxy.expect('Reached home')
print("RTL Complete")
return True